help with mysql database retrieval from php script pls
am a new PHP and MYSQL developer and i am using your book which has been of tremendous help so far especially your examples. However, i am having problems with getting data out of my MYSQL database especially when i want to count the number of affected rows the select statement affects. i get this error and cant seem to get around it for a couple of days now
e.g mysql_affected_rows(): supplied arguement is not a valid MYSQL result resource
i also get the same error with mysql_fetch_array, mysql_num_rows and this kinda functions. pls i need your help.
connection from PHP to mysql db is working well though.
Affected rows is only for queries that change the database, like INSERT and UPDATE. If you want to know the number of rows found by a SELECT query, use mysql_num_rows.
Bookmarks