There's something wrong with this code.

Source: Internet
Author: User
$SQLQ = $empire->query ("Select Infotags,id from hd_ecms_shop_data_1 WHERE hd_ecms_shop_data_1.infotags like '% Dear% '" );
$result = $empire->fetch ($SQLQ);
Print_r ($result);//This step can print out values to
if ($empire->num ($result))
foreach ($result as $value) {
if (Isset ($result [' ID ']))
$idStr. = $result [id]. ', ';
};
$idStr =rtrim ($idStr, ', ');
echo $idStr; exit;
?>
Error tip: Warning:mysql_query () expects parameter 1 to is string, array given in D:\WWW\dgcms\e\class\db_sql.php on line 15

The above code, I do not know where there is a problem


Reply to discussion (solution)

You take this statement to MySQL to see if it's correct

Error when you call the $empire->query () method to query the SQL statement, there is a warning, you input to mysql_query () is not a string but an array ....
This error should occur in the class that generated the $empire object, and the code here does not show

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.