Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in
$connect=mysql_connect("localhost","root","123") or die("无法连接数据库".mysql_error()); mysql_select_db("cmstest") or die("无法选择数据库".mysql_errno()); $sql="select * from article where pid=1"; $result=mysql_query($sql,$connect) or die("无法查询sql语句".mysql_error()); $nums=mysql_num_rows($result); echo "nums is:".$nums; while($res=mysql_fetch_array($result)){ echo $res[0]; }
原来是$result重复了.
教程地址:
欢迎转载!但请带上文章地址^^

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.
