Author

Topic: resolved (Read 649 times)

b!z
legendary
Activity: 1582
Merit: 1010
September 26, 2013, 10:00:45 AM
#4
closed. thanks for your help guys.
hero member
Activity: 728
Merit: 500
September 26, 2013, 09:28:30 AM
#3
mysql_result() requires a query-result to work with. If no query-result is available, this can be for several reasons:
- there was an error.
- the query is of a type that only returns a success/failure. For example: INSERT or UPDATE queries.

The code you posted is just a function library, so I can't tell what actual code calls the problematic function, so at this stage we can't really debug further.

Also note that the mysql_ set of functions is deprecated and you should use the mysqli_ functions. See php.net for details.
newbie
Activity: 10
Merit: 0
September 26, 2013, 09:17:14 AM
#2
You need to check the value of $this->query = mysql_query(...) and if it indicates an error then print mysql_error() to see what went wrong.

You should also check the returns of mysql_connect() and mysql_select_db().

And I really hope you're using escape(). :-)
b!z
legendary
Activity: 1582
Merit: 1010
September 26, 2013, 09:04:07 AM
#1
closed. thanks for your help guys.
Jump to: