Search
 
SCRIPT & CODE EXAMPLE
 

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());
Comment

mysqli_query() expects parameter 1 to be mysqli, string given

<?

$qry = mysqli_query($connection, $query);
// $connection: database connection
// $query: your query
Comment

PREVIOUS NEXT
Code Example
Php :: how to sum values of two product which are same gst rate and this product are come from foreach loop in php 
Php :: phpexcel set data type 
Php :: wp php get product attribute name without pa 
Php :: extract email from text 
Php :: WP Hero Img 
Php :: php preg_match html cross origin 
Php :: ftp login wordpress not working 
Php :: laravel restore deleted 
Php :: clear laravel cache and clear vue 
Php :: No match for argument: phpmyadmin yum 
Php :: How to hide tax details from woocommerce order emails 
Php :: markdown mail html rendering laravel 
Php :: an einem string etwas anfügen php 
Php :: exists:categories,id except a value laravel 
Php :: woo account page 
Php :: laravel read csv 
Php :: how to put external file in laravel listener class 
Php :: laravel Add a static label/text above panel 
Php :: share with all blade in laravel 
Php :: buddy group hide notice join 
Php :: way to convert an integer to an array of numbers 
Php :: WP DELETE UNUSED TAGS 
Php :: htaccess file for multisite 
Php :: how to increase wp mailster attachment size 
Php :: composer in serveur ionos 
Php :: merge cell collumn phpOffice 
Php :: laravel vu3 
Php :: php shell_exec must be connected to a terminal 
Php :: php array_walk_recursive 
Php :: php discord webhook sender 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =