problem with php mysql query


Posted on 16th Feb 2014 07:03 pm by admin

Hi guy's...

I'm totally lost here..because don't have any idea how to make a query for grab record using BETWEEN startdate and enddate since existing record are stored using this format datetime(dd/mm/yyyy hh:mm:ss) but my supplied $startdate and my $enddate are in this format date(dd/mm/yyyy) only....hope someone will shed me some light on this...is it possible to grab those record...??

Code: //example of my query..

$sqlquery = "SELECT * FROM sometable WHERE OFFENCE_NOTICE_STATUS = 'A' AND CREATED_DATE BETWEEN ".$start_date." AND ".$end_date;

//can't run this query because of the stored record in database are in different format datetime(dd/mm/yyyy hh:mm:ss)

//my supplied variable in date(dd/mm/yyyy) format...


Any help are appreciated TQ..

348 Like 35 Dislike
Previous php-forum Next php-forum
Other php-forum

Create comparison matrix?
I want to create a comparison script for forum software and was wondering is there any tutorial or b

Move array index to end
Hey guys,
Quick question:

I have an array that looks like this:
Code: [Select]$var =

having probem inserting data into db table
hi

i have a table with following columns in it
Code: candidate_id, degree, cgpa, institute

Hashing?
Hi, I was hoping to take a string value then convert it - consistently - across each of our pages in

Show specific day of the week
I have been racking my brain trying to get this function to work properly and it is doing so for eve

Weird MySQL error, why am I recieving this?
PHP Code:


<?php require "global_settings.php"; ?>
<titl

Run function every 5 mins ??
I have a function PostMessage()

How can I run it every 5 mins ??

How to ask a regex question?
Hi, I thought I'd share some of my insight after seeing too many bad questions that either get ignor

This is driving me nuts!
This insert query looks to be alright, however I get this error:

QuoteYou have an error in yo

Need help making login verification cleaner...
I use the below to verify user login. I first check the cookie for the id, ip and a unique id. If it

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash