Jump to content
xisto Community
Sign in to follow this  
herenvardo

Issue With MySQL Database I cannot output the data :(

Recommended Posts

I'm experienced on HTML and php, but it's my first attempt to work with databases. I've made a small test.php file to try out my code before publishing it and find some problems. The calls to mysql_connect() and mysql_select_db() work ok, but i get this message when trying to output a small table:

Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /home/gdt/public_html/test.php on line 26

The relevant part of my code is as follows:

25: $ps_res = mysql_query("SELECT * FROM 'proj_status'");26: $ps_num = mysql_numrows($ps_res);
I need the numrows value to have a break condition in the loop that outputs the data. Also, I've tried to avoid the numrows call, by putting a literal number of rows, taken by directly counting the rows from phpmyadmin: I avoided the error message, but the browser hangs when I try to run the script.
Can somebody help me??
Thanks

Herenvardo

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.