techker
09-30-2008, 01:51 PM
hey guys im trying to output something if a querry is empty?
<?php
$QQQ4 = mysql_query(" SELECT *
FROM `tests`
LIMIT 0 , 30 ");
if(mysql_num_rows($QQQ4) == 0)
{
$QQQ4 = 'to come';
}
i have this done but it does not work?whats wrong with it?
if it empty it gives me
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in url on line 37
<?php
$QQQ4 = mysql_query(" SELECT *
FROM `tests`
LIMIT 0 , 30 ");
if(mysql_num_rows($QQQ4) == 0)
{
$QQQ4 = 'to come';
}
i have this done but it does not work?whats wrong with it?
if it empty it gives me
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in url on line 37