PHP4 to PHP5 (mysqli)
hi folks,
i'm having trouble editing page in dreamweaver move form php4 php5. keep getting stuck on sql , 'mysqli'.
can let me know why error using following code.
12 mysqli_select_db($database_con_mydata, $con_mydata);
13 $query_rs_category = "select * course_category courseprefix ='$courseprefix'";
14 $rs_category = mysqli_query($query_rs_category, $con_mydata) or die(mysql_error());
15 $row_rs_category = mysql_fetch_assoc($rs_category);
16 $totalrows_rs_category = mysql_num_rows($rs_category);
the error is:
warning: mysqli_select_db() expects 2 parameters, 1 given in /applications/mamp/htdocs/2015-php5/courses.php on line 12
warning: mysqli_query() expects parameter 1 mysqli, string given in /applications/mamp/htdocs/2015-php5/courses.php on line 14
it looks tried type in "i" make statements change. in mysqli statements, resource link first variable in select_db , _query followed database selection or query. instance:
mysqli_select_db($database_con_mydata, $con_mydata);
should be:
mysqli_select_db($con_mydata, $database_con_mydata);
More discussions in Dreamweaver support forum
adobe
Comments
Post a Comment