Mysql_fetch_array (): suppliedargumentisnotavalidMySQLresultresource

Source: Internet
Author: User
Mysql_fetch_array (): suppliedargumentisnotavalidMySQLresultresource php invalid SQL result resource mysql






Jiangsu Nong agriculture and forestry Ecosystem Development Co., Ltd.



Include "conn/conn. php ";

?>
?>







Customer service | FAQs | farm experts | merchants | set to homepage








  • First page

  • The second generation of agriculture

  • News Center

  • Special breeding

  • Green products

  • Landscape Engineering

  • Service Scope

  • Human resources

  • Customer Message

  • Contact us



























































  News





  Company News





  Industry Consulting





  Technical Q &





  Success Stories





  Customer rating





  Company Services
 

































If ($ _ GET ['Identification ']! = Null ){$ SQL = mysql_query ("select * from frontpagenews where identification =". $ _ GET ['Identification ']. "order by createDate desc limit 0, 7 ");Here error 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: Homepage> 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 desc 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'] will not be connected with order?
If $ _ GET ['Identification '] = 1
No more SQL commands
"Select * from frontpagenews where identification = 1 order by createDate desc limit 0, 7"
?

Careless. Thank you. Less space

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.