|
|
Posted by J.O. Aho on 11/12/06 12:06
affiliateian@gmail.com wrote:
> J.O. Aho wrote:
>> Is the date the current date?
>> if yes,
>>
>> $date=date('Y-m-d');
>
> By the way, would any of these also work?
>
> $date=$_REQUEST['CURDATE()'];
>
> $datetime=$_REQUEST['now()'];
No, none of those will work, but you can use those SQL functions when you
insert the data into the table
$query="INSERT INTO table('column1','column3','column4')
VALUES(CURDATE(),'$fromphp','$fromphp2')";
That assuming you have an insert of something like
$query="INSERT INTO table('column1','column3','column4')
VALUES('$date','$fromphp','$fromphp2')";
You have to keep in mind that $_REQUEST does only include values that are sent
to the page with post/get and cookie, to see what you have in it, you can use
print_r()
print_r($_REQUEST);
It can't magically use SQL functions.
//Aho
Navigation:
[Reply to this message]
|