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

No comments posted yet

Your Answer:

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

parameter passing issue on function
Well I thought I had created a pretty slick web page, using ?page and $_GET to load pages which wher

DOMDocument parsing
Hello, I am parsing an xml file from an API which I have converted into a DOMDocument in php. This i

in php, link returns to the line
When I add a link in a php page, the link word returns to the line (as a
would do)

Examp

Two fgetcsv related questions ;D
First of im trying to get a file from a merchants server but the directory is protected, I know the

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

script is pulling more then they have....
I have this script for my game where they can change there race. This will cost them 2,500 points. H

Undefined offset when using a flat file with pipe symbols
Hi, I've got a flat file/text file which I'm currently using as a member database for my site (not a

add text and number image
hi guys ..

ok see i want the user to add their name and pick a number then click get it and i

mr8m - reverse document
Friends,

I'm trying to reverse a document held by MIRO, but it reports the message balan

Multiple PHP errors when clicking a link..and..removing a ghost..
Hi - I have 2 problems with a new website - homeswapvacations.com, which I need help solving.

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