开发者

Help me function getListCategory()

开发者 https://www.devze.com 2023-03-16 14:23 出处:网络
function getCategoryList() { global $conn; $result = @mysql_query(\"Select * From categories\", $conn); $ret = array();
function getCategoryList()
{
    global $conn;
    $result = @mysql_query("Select * From categories", $conn);
    $ret = array();
    while($row = mysql_fetch_assoc($result))
    {
        $ret[] = $row;
    }
    return $ret;
}

=> output = null Although database not null (ex: category(1, laptop, 500)) I think it wr开发者_开发知识库ong in $ret[] = $row; Help me with


You have @mysql_query(.

Drop the @ :

$result = mysql_query("Select * From categories", $conn);
0

精彩评论

暂无评论...
验证码 换一张
取 消