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...??

Did you know?Explore Trending and Topic pages for more stories like this.
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..
No comments posted yet

Your Answer:

Login to answer
348 Like 35 Dislike
Previous forums Next forums
Other forums

PHP Form to Variable.
Hi! I have written a HTML-form code in DreamWeaver CS3 (in a PHP doc) and I really need it to work s

send message to the java application
Oracle 10g with Windows platform.

I have a java application that periodically pings the d

How to get all server headers like Live http Headers does
Hey all, like many of you I use the Firefox addon "Live http Headers". I'm trying to write

opening a window with after form submission
I know this this forum has nothing to do with JS, but i'm trying to use it with my php script.
<

Images outside webroot
Im hopeing someone can help me with this because i cant figure it out.I have setup an ASP.NET websit

PHP error. Need help urgently
Hi,

I am programming a php site and have a problem that i just cant find out how to fix. When

parse error
Parse error: syntax error, unexpected '[', expecting ')' in /Users/admin/Sites/phptest/array.php on

Display certain image depending on time of year
Hi, I am new to these forums and would really appreciate some advice on a piece of coding I have don

Kill a process
I have a question - how can I kill a process from a command line or by using Oracle SQL Developer? I

what does this mean? +=
is anyone able to explain what this code is saying?

i had it written for me awhile back and n

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