PHP/MySQL Select Row

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
Tim1681
-


Joined: 17 Jan 2005
Posts: 160
Location: Bristol, CT, USA

PostPosted: Tue Jun 14, 2005 2:47 pm    Post subject: PHP/MySQL Select Row Reply with quote

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 View user's profile Send private message AIM Address
olly86
-


Joined: 25 Apr 2003
Posts: 993
Location: Wiltshire, UK

PostPosted: Tue Jun 14, 2005 5:56 pm    Post subject: Re: PHP/MySQL Select Row Reply with quote

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 View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group