05-01-2008, 06:59 PM
|
#3 (permalink)
|
|
The Gregarious
Join Date: Mar 2008
Location: Cana'derr
Posts: 653
Thanks: 24
|
According to the documentation, $result should be an object returned by the query, and the actual location of the variable would be $result->affected_rows. $this->mysqli->affected_rows just returns 0, and $this->mysqli->num_rows doesn't exist (as you're supposed to use $result->num_rows). It works just fine in my other database queries, which is why it's wierding me out that it's not returning $result for this one.
I wound up changing it to;
PHP Code:
$q = sprintf("UPDATE " . TBL_USERS . " SET password='%s' WHERE username='%s'", $szPassword, $szUsername);
if ($this->mysqli->query($q)) { return 1; } else { return 0; }
but I'm still curious as to why that one query won't return an object to $result.
-m
|
|
|
|