| 
	
 | 
 Posted by Chris Hope on 08/04/06 01:39 
walterbyrd wrote: 
 
> Chris Hope wrote: 
>> 
>> You need quotes around the date: 
>  
> Thanx. That did it. 
> By the way, when putting together  an sql statement, when do I use 
> single quotes, and when do I use \"$var \" ?? Or does it matter? 
 
With mysql you can use single quotes and double quotes interchangeably. 
Other databases are not so tolerant. 
 
>> or realise that now() is a SQL function and do: 
>  
> When I try t use now(), I get an undefined function error. I am using 
> PHP 4.4, under windows, if that matters. 
 
It's *not* a PHP function. It's a SQL function. So you put it in the SQL 
query eg "INSERT INTO some_table (datefield) VALUES (now())" 
 
--  
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com
 
  
Navigation:
[Reply to this message] 
 |