When checking whether the column exists, an error is reported
万叶
万叶 2017-06-22 10:17:36
0
2
1001

$sql="select count(*) from cat where catname=$cat[catname]";

    $rs=mysql_query($sql);

    if(@mysql_fetch_row($rs)[0]!=0){

    echo "栏目存在";

    exit();

    };


万叶
万叶

reply all(2)
SunBoy

Post the error message

洪涛

$cat[catname] Is this an array? The content in [] should be enclosed in quotation marks

$sql="select count(*) from cat where catname=$cat['catname']";


Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!