Hi. To connect with database I`m using serendipity_db_query function. But I`m looking for something like mysql_num_rows... Does something like this exists?
And second question is:
I`ve got function:
s9y does not have a "num_rows". You can just use count($result) on the return variable of a serendipity_db_query, because that holds the number of results!
If you put a function within a class, you need to call it as $this->SampleFunction().
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Then you'll see how $t is returned! It actually contains a nested array.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
The array is returned as soon as you have a valid SQL query that returns more than 0 rows.
The second parameter you can lookup by looking into include/db/mysql.inc.php in the PHPDoc comments of the serendipity_db_query() function. It indicates whether your statement expects a single row, or multiple rows.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/