User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 428,472 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,169 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting

Hopefully a straightforward PHP/MySQL question

Join Date: May 2008
Posts: 84
Reputation: antwan1986 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 3
antwan1986's Avatar
antwan1986 antwan1986 is offline Offline
Junior Poster in Training

Re: Hopefully a straightforward PHP/MySQL question

  #3  
May 8th, 2008
Originally Posted by robothy View Post
Hey,

If you run the SQL select query to find a vid record, if it returns no rows, which you can find using mysql_num_rows(), display the error message.

R.


Hi and thanks for your quick reply. I looked that function and came up with the following, which works brilliantly.

if (mysql_num_rows($result) == 0) { die("Uh-oh.."); };

Thank you very much, you're a life saver.

Anthony
"Beneath this mask there is more than flesh. Beneath this mask there is an idea, Mr. Creedy, and ideas are bulletproof." - V
Reply With Quote  
All times are GMT -4. The time now is 9:19 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC