How to list rows for a query or display 'no records' using a single query

前端 未结 3 1449
一个人的身影
一个人的身影 2021-01-26 10:45

How to list records for a query and to display \"no records\" when no rows returned using a single query?

Currently I am using a COUNT(*) query or using

3条回答
  •  臣服心动
    2021-01-26 11:10

    Try Something like following

       if (mysql_num_rows ==  '0')
           'No Records'
        else
           //YOUE CODE HERE
    

提交回复
热议问题