In This Tutorial, we are showing how to search date between two varchar column fields using PHP and MySql
we can easily understand with the help of example written below: -
In the database, we have two column in database like:-
1). bill_start_date
2). bill_end_date

$final_date = '2015-06-08 12:04:05';
$finaldate = date("d/m/Y",strtotime($final_date));  // 08/06/2015 coming like this.

$cycling_start = $BSC->getSingleresult("select * from #_country_group_billing_cycle where str_to_date(bill_start_date,'%d/%m/%Y') <= STR_TO_DATE('$finaldate', '%d/%m/%Y') AND str_to_date(bill_end_date,'%d/%m/%Y') >= STR_TO_DATE('$finaldate', '%d/%m/%Y')");



Using this query we are able to search date between two date fields.
If you have query regarding Adsense then you can contact me through contact form below.
Next
This is the most recent post.
Previous
Older Post

0 comments :

Post a Comment

 
# Top