Data read error
conn.php
$conn =mysql_connect ("localhost", "Mlstudio", "ml902975");
mysql_select_db ("db_bcty365", $conn);
mysql_query ("Set names gb2312");
?>
Show page code
$sqluwz =mysql_query ("SELECT * from Tb_soft ORDER BY addtime desc limit 0,7", $conn);$infouwz =mysql_fetch_array ($SQLUWZ);if ($infouwz ==false) {?>
|
No software available to download! |
}else{$i =1; do{?>
|
"class=" > "A1" if ($i ==1) { echo ""; } Echo unhtml (Msubstr ($infouwz ["Softname"],0,16); if (strlen ($infouwz ["Softname"]) >16) { echo "."; } echo "[". substr (Str_replace ("-", "/", $infouwz [Addtime]), 0,10). "]"; if ($i ==1) { echo ""; } ?>
|
|
$i + +;} while ($infouwz =mysql_fetch_array ($SQLUWZ)); }?>
|
|
Web page Tip Error
Warning:mysql_fetch_array (): supplied argument is not a valid MySQL result resource ...
------Solution--------------------
You have to understand do....while structure ... Whether the condition is established or not, it will circulate once.
Suggested changes to:
while ($infouwz =mysql_fetch_array ($SQLUWZ))
{
Do something here ....
}
Warning:mysql_fetch_array (): supplied argument is not a valid MySQL result resource ... To report such a mistake, you have to add or Die (Mysql_error ()) after mysql_query ($sql) to see if there are any SQL errors.