Data Read exception

Source: Internet
Author: User
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) {?> }else{$i =1; do{?> $i + +;} while ($infouwz =mysql_fetch_array ($SQLUWZ)); }?>
No software available to download!

"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 "";
}
?>






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.
  • 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.