View previous topic :: View next topic |
Author |
Message |
Tim1681 -
Joined: 17 Jan 2005 Posts: 160 Location: Bristol, CT, USA
|
Posted: Tue Jun 14, 2005 2:47 pm Post subject: PHP/MySQL Select Row |
|
|
I'm making a News script and i am currently making the Update part so you can update any news article in the database. The trouble i am having is that i cannot find a way to tell MySQL to ask for a certain row designated by the date it was put in.
Example
Code: | $query = "SELECT entry, news_text FROM news"; |
Instead of putting it in a While statement and having it generate a loop until it reads all the entries, i want it to select the entry from the date which is in the date column. Any way to do this that you might know of? |
|
Back to top |
|
 |
olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Tue Jun 14, 2005 5:56 pm Post subject: Re: PHP/MySQL Select Row |
|
|
Code: | $query = "SELECT `entry`, `news_text` FROM `news` WHERE `entry` = 'date'"; |
This should do the trick, just add the WHERE clause. _________________ Olly |
|
Back to top |
|
 |
|