Mysql_fetch_array (): supplied argument is not a valid MySQL result resource

Source: Internet
Author: User
PHP Invalid SQL result resource MySQL






<title>Jiangsu Agriculture Second generation Agriculture and Forestry Ecological Development Co., Ltd.</title>



Include "conn/conn.php";

?>
?>







Customer Service | FAQs | Farm Experts | Join Us | Set as homepage






    • Home

    • Into the second generation of agriculture

    • News Center

    • Special Breed

    • Green Products

    • Landscape Engineering

    • Service scope

    • Human resources

    • Customer Message

    • Contact Us



























































News Center News





Company News





Industry Consulting





Technical questions





Success Stories





Customer Testimonials





Company Service


































if ($_get[' identification ') = null) {$sql = mysql_query ("select * from frontpagenews where identification =". $_get[' identification ']. " ORDER BY createdate desc limit 0,7 ");Error here while ($result = Mysql_fetch_array ($sql)) {?> }}else{ $sql = mysql_query ("select * from frontpagenews where identification = 1 ORDER BY createdate desc limit 0,7");while ($result = Mysql_fetch_array ($sql)) {?> }}?>






News Center You are here: Home > News Center






Error message

Warning:mysql_fetch_array (): supplied argument is not a valid MySQL result resource in C:\Apache\htdocs\growers\news.php On line 147


Reply to discussion (solution)

$sql = mysql_query ("select * from frontpagenews where identification =". $_get[' identification '). "Order by CreateDate des C limit 0,7 ");

mysql_query ("select * from frontpagenews where identification =". $_get[' identification ']. " ORDER BY createdate desc limit 0,7 ");
Unless the last character of $_get[' identification '] is a space, the value of $_get[' identification '] is not linked to order?
If $_get[' identification '] = 1
Your SQL command is out of order.
"SELECT * from frontpagenews where identification = 1order by createdate desc limit 0,7"
It?

A careless man's life. Thank you so much. A few spaces

  • Related Article

    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.