Check data from database through query BY "WHERE"

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
avmohankumar
Forum Newbie
Posts: 14
Joined: Fri Jun 08, 2007 7:20 am

Check data from database through query BY "WHERE"

Post by avmohankumar »

Dear Friends,

I have three dates in the database called, date1, date2, date3.
I have to write a query. the query has to search the date by WHERE condition in database.
If the date is find, I have to add some amount value on that day.

How can I create by using php and mysql.

Please Help me,

Thanks in advance.

Regards,
maza.
User avatar
xpgeek
Forum Contributor
Posts: 146
Joined: Mon May 22, 2006 1:45 am
Location: Kyiv, Ukraine
Contact:

Post by xpgeek »

You need to use sql update statement.

Code: Select all

mysql_query("update table1 set value = 13 where date1 between '2007-09-15' and '2007-09-28' ");
For more information please use Job Hunt thread.
Post Reply