How to do mysql_num_rows() in Drupal 7
Drupal 7 uses it’s own database API, so using simple PHP functions like mysql_num_rows() does not work. Drupal API isn’t very up to date with this, but the earlier db_num_rows() function does not exist anymore, and db_affected_rows() is not good either, because you can’t use it with SELECT queries. Answer is to use method called… [Lue lisää…]
tammikuu 16, 2012
0