[development] PDO and database limitations
Karoly Negyesi
karoly at negyesi.net
Wed Apr 4 16:20:29 UTC 2007
> A) Stop using db_num_rows() on result sets.
Yes, but most of the time we do not need the exact count, we just want to see whether there is a row or not. That can be replace with a query limited to one row: db_result(db_query_range(' ', 0, 1)) and check for === FALSE . There is only one case in core where we use the exact count, and that's the online users block.
> Ubuntu Feisty (due later in April) will have PHP 5.2.1. http://packages.ubuntu.com/feisty/web/php5
Good. Drupal 6 will be out in the summer. Debian Etch has 5.2.0. However, RHEL 5 has only 5.1.6 paackaged.
I would say, just go ahead and let the world play catch up. For example you could issue some warning on the requirements page that if PDO is used then "it's strongly recommended" to run 5.2
Rock on!
NK
More information about the development
mailing list