【发布时间】:2016-10-08 05:49:17
【问题描述】:
我又需要一点帮助...我得到错误的mysql参数,我知道问题但我找不到丢失的参数...这是问题行
**`$result_template = mysqli_query($select_template) or die(mysql_error());`**
我知道缺少 1 个参数,但我不知道是哪一个??你能帮帮我吗?谢谢
这部分代码可能有用....
/*function to display the active template*/
function displayTemplate(){
$tableprefix = "";
global $tableprefix,$_SESSION;
$template_array = array();
$select_template = "SELECT vtop_filename,vleft_filename,vbottom_filename,vimages_folder,vcss_name,vtemplate_name
FROM ".$tableprefix."template_master WHERE vactive_status = 'Y'";
1579---->>>> $result_template = mysqli_query($select_template) or die(mysql_error());
$template_row = mysql_fetch_assoc($result_template);
array_push($template_array,$template_row['vtop_filename'],$template_row['vleft_filename'],$template_row['vbottom_filename'],$template_row['vimages_folder'],$template_row['vcss_name'],$template_row['vtemplate_name']);
return $template_array;
}
【问题讨论】:
-
你需要将连接变量传递给 mysqli 函数
-
对不起@Kinshuk 我听不懂
-
你错过了 Connection 对象....这里是快速语法参考
$res=mysqli_query($con_object,$query); -
mysqli_query($conn,$select_template)添加您的连接变量 -
您已经在某个变量中设置了 mysqli_connect。将该变量传递给函数的第一个位置。