i was thinking of using this...however this is untested
Code: Select all
DELETE FROM merchant by create_date desc WHERE create_date >30Moderator: General Moderators
Code: Select all
DELETE FROM merchant by create_date desc WHERE create_date >30Code: Select all
1. date
2. datetime
3. timestampCode: Select all
DELETE FROM merchant
WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <=create_dateCode: Select all
SELECT something FROM tbl_name WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= date_col;
Obadiah wrote:thanks to all you guys for replying, and sorry for the late reply(again much appologies for posting in the wrong forum) , i dont have internet at home so my post are limited to my 9-6:30 work hours for the time being but:
@burrito= i had trouble understanding this at firsti was under the impression that Date_Sub was the name of the date_column in the databaseCode: Select all
SELECT something FROM tbl_name WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= date_col;...once again hamster is running on the wheal but the gears are stuck
![]()
@everah="version 5.0.21" this will be my first time using the date/time function![]()
@aaronhall= thanks for the link im definately gonna experiment into date-time a little deeper
@dibyendrah= aah...now i get what it was saying...now for some more testing
Code: Select all
SELECT something FROM tbl_name WHERE create_date<=DATE_SUB(CURDATE(),INTERVAL 30 DAY);Code: Select all
$sql="INSERT INTO $table_name WHERE DATE_SUB(CURDATE(),INTERVAL 1 DAY) <=create_date ";
huhdibyendrah wrote: Oh sorry Obadiah !
My mistake ...
It should be something like this ...Try this.Code: Select all
SELECT something FROM tbl_name WHERE create_date<=DATE_SUB(CURDATE(),INTERVAL 30 DAY);
Code: Select all
SELECT something FROM tbl_name WHERE create_date<=DATE_SUB(CURDATE(),INTERVAL 30 DAY);
Code: Select all
$today = date("Y-m-d");
$create_date = $today(CURDATE());//line10
$sql = "INSERT INTO $table_name values('$_POST[merchant_num]',
'$_POST[date_recieved]',
'$_POST[merchant_name]',
'$_POST[purchase_type]',
'$_POST[lease_score]',
'$_POST[amex]',
'$_POST[app_id]',
'$_POST[discover]',
'$_POST[user_name]',
'$_POST[check_conversion]',
'$_POST[gift_loyalty]',
'$_POST[app_type]',
'$_POST[terminal]',
'$_POST[serial_num]',
'$_POST[nms]',
'$_POST[ckmerchant_num]',
'$_POST[giftmerchant_num]',
'$_POST[comments]',
'$_POST[create_date])'";ok...that tells me i got something half-working but what do i do now?!? what does this error meanFatal error: Call to undefined function 2006-11-28() in C:\Program Files\status_modified.php on line 10