$result is not an object, which most likely means your query failed.
There are a couple of issues with your overall design as well. For one you are executing the query twice. Here:
PHP Code:
if(!$mySQL->query($sql))
and here:
PHP Code:
$result = $mySQL->query($sql);
The other issues I see is here:
PHP Code:
if($mySQL->nums($sql,'') == "0")
I have no idea what library you're using, but it seems like if you want to get the number of rows you would get it from a result resource, not a query string. Also, why are you quoting the zero? Technically it will still work, but it is poor coding.
Quote:
Originally Posted by vectorialpx
If you pasted well, you have a mising '}' at the end.
|
If there were an issue with his syntax he would get a parse error.
Last edited by NullPointer; 08-25-2011 at 02:29 AM..
|