Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

$numrows=mysql_num_rows($query);

Featured Replies

Hi all i am using te folloeing to find out how many rows in mysql that are called in a search

 

$numrows=mysql_num_rows($query);

 

 

the problem is sometimes it will fetch no rows and i get an error is there another way of getting around this thanks :mellow:

Do you mean making it not display the error?

 

Put this at the top of your script:

 

error_reporting(0);

  • Author
Do you mean making it not display the error?

 

Put this at the top of your script:

 

error_reporting(0);

Hi again yes i have done this but just thought there may be a more profesional way of doing it as i am a beginer to php mysql thaks for the reply

$numrows=@mysql_num_rows($query);

 

The @ will hide the error.

 

Alternatively you can do another select by using

 

SELECT COUNT(1) FROM tbl_name WHERE this = 'something' and other_thing = 2

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.