Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

mysqli_query() expects parameter 1 to be mysqli

$myConnection= mysqli_connect("$db_host","$db_username","$db_pass", "mrmagicadam") or die ("could not connect to mysql"); 
$sqlCommand="SELECT id, linklabel FROM pages ORDER BY pageorder ASC";
$query=mysqli_query($myConnection, $sqlCommand) or die(mysqli_error($myConnection));


/* Or, Using mysql_query() (This is now obselete) */

$myConnection= mysql_connect("$db_host","$db_username","$db_pass") or die ("could not connect to mysql");
mysql_select_db("mrmagicadam") or die ("no database");        
$sqlCommand="SELECT id, linklabel FROM pages ORDER BY pageorder ASC";
$query=mysql_query($sqlCommand) or die(mysql_error());
 
PREVIOUS NEXT
Tagged: #expects #parameter #mysqli
ADD COMMENT
Topic
Name
8+6 =