Jump to content

[SOLVED] Empty Queries?


jwwceo

Recommended Posts

I have a query which shows all the rows for certain conditions. I am using

 

while($info = mysql_fetch_array( $data ))

 

for my loop to output each row.

 

I would like there to be a message saying "Nothing to edit" if the rows are empty.

 

I tried this:

 

if (empty ($info)){

 

echo "<p><h2>There are no packages to edit</h2></p>";

 

}

 

But I get this message no matter what. I am thinking that $info has no value after the loop. What other variable can I use???

 

James

Link to comment
https://forums.phpfreaks.com/topic/81518-solved-empty-queries/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.