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

Tracking Unique Clicks
Hi guys and gals,

Basically I have a database which tracks clicks on my outbound links, I do

Warning: session_start() headers already sent error - Driving me Nuts!
I am trying my sister in laws site and I keep getting an error with my coding. I am more of a design

Sub-domains & calling unique content
Hello,

Is there a way use something similar to the $_GET function for a sub-domain? I to be a

Problem with Sending Mail by PHP
hello all,
I m new to php, can u plz provide me the code to send mail by php having CAPTC

Splitting Attributes
SQL> SELECT I_NAME, substr(I_NAME,1,instr(I_NAME,'O')) "First part",

substr(I_NAME, IN

Preventing SQL Injection
I have a question about SQL Injection, In some of our code we use this: view plaincopy to clipboa

1,000 select boxes with 100 options?!
I have 1 drop down select box with 1,000 options.


In some case, there will be 100+ of the

division gives infinity anser
int main()
{
int z=0;
int i=1/z;
cout<
}

It doesn't throw a

Multithreading design
Hi

I have come up with a Singleton class that manages a pool of database connections. Basical

Query issues
I probably have this setup wrong well I know I do because nothing is showing up now. What I want is

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