|
Comments for: nasser20030219.php3
| Message # 1015518: |
|
Date: 02/21/03 12:32
By: kev Subject: Good GD use, poor SQL practice! Hi, nice intro to GD... and the results is there, working fine. However, although this is no an article concerning databases, the code used for accessing the db is quite poor. First the design of the DB could be improved (what is the point of having a "voteoptions" table if you still use hard coded values in the "poll" table?). Second thing, if the poll system gets populare, the database and this script are gonna suffer! mysql_num_rows works fine, but a good all SELECT COUNT(id) saves a lot of processing to the DBMS. And the use of mysql_fetch_object() for instance would save some lines of code as well as some processing on the php part... |
Previous Message | Next Message |
| Comments: | ||
| dont forget the last line (top of page2) | steve | 05/02/05 18:46 |
| Just a small thing to keep an eye on | Amitabh Kant | 09/25/04 09:17 |
| RE: Good GD example | Tran PHuoc Long | 12/19/03 10:18 |
| Good GD example | Rupa | 08/14/03 05:46 |
| RE: Why don't you | andy | 06/30/03 03:31 |
| even easier.... | Roger | 02/27/03 17:42 |
| Why don't you | Rob | 02/21/03 13:41 |
| Good GD use, poor SQL practice! | kev | 02/21/03 12:32 |
|
If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly. | ||


