Jump to content

Result status


ballouta

Recommended Posts

Hello

I have the following query, i want to display the table header if the result was > 0

I was trying this but it is not working:

<?php
$sql = mysql_query("SELECT * from members where `username` LIKE '%$usr%' ");
if (mysql_num_rows($sql) > 0)
    {
   //print table header

while( $row = mysql_fetch_array($sql))
{

        //print members found
             }


    }
else
{
//no members found
{
?>

 

please help

Thank you

Link to comment
https://forums.phpfreaks.com/topic/160758-result-status/
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.