Bravo List
Register
Go Back   > Bravo List > P2P > Forum > Community Cafe
Reply
  #1  
Old 18th June 2018, 19:21
BamBam0077 BamBam0077 is offline
Banned
 
Join Date: Jul 2013
P2P
Posts: 410
Question Does this work?
Code:
@cmsquery function
 function cms_sql($query) {

$sql = mysql_connect("localhost", "root","","db");

while ($sql) {
 $query = mysql_query($sql, $query);
 }

return $query;
 } // cms query function
Bump: I wanted to use $db connection inside the $query, so I learnt mysql_query($db,$query) or mysql_error(__FILE__, __LINE__); would be the way via while($sql) function wanted to know if works can not get my mobiles server side to work like what ide or which app to run since no xampp on mobile as far as I can understand. So I need someone with laptop or PC to test and report back if possible or tell me a way to run on mobile.

Bump:
Code:
<!doctype html>
<html lang="en">
<!-- header title	-->
<title><?php echo("hello"); ?> :: Shop </title>
<script src="[ajax.googleapis.com];
<head>
<link rel="stylesheet" href="css/shop.css" />
</head>
<body>
<text><?php echo("Geetings");  ?></text>
<pre>
<?php
//db connection shoud be mysqli but mobile app only runs with mysql so i lose the real expierence using msqli but get the same concept via mysql......so here without using function we proceed with a variable to connect.
$con = mysql_connect("localhost", "root", "");
// if statement with connection failed
if (!$con) {
  die("Could not connect: " . mysql_error());
//else print,echo,$varible
// i chose to use this method instead seems to work the same as using echo...
} else {
?>
<text>herro world</text>
<text>sql connection works</text>
<?php } ?>
YOU
Use mysqli my setup runs with mysql for now so bare with me on this share,find etc... I
Reply With Quote
Reply

Tags
work

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 20:33. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.