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 |
|
You are here: Home > News Center |
|
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)) {?>
|
|
|
}}?>
|
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