RE: [PHP-DB] getting rows by an ID field or by another field in a table

2005-12-06 Thread Bastien Koert
Adding an ID field allows you to quickly point back to any particular record if you manage to have duplicate data... Bastien From: "Eternity Records Webmaster" <[EMAIL PROTECTED]> To: Subject: [PHP-DB] getting rows by an ID field or by another field in a table Date: Tue, 6 Dec 2005 14:42:3

Re: [PHP-DB] getting rows by an ID field or by another field in a table

2005-12-06 Thread Joseph Crawford
i would do something like SELECT id, date, subject FROM journal LIMIT 20 ofcourse this would mean you have to add an id column to your table and i would make that a primary key and auto_increment, this way when you do the select you could do something like this $res = mysql_query("SELECT id, da