You are here: Re: MySQL Query « PHP SQL « IT news, forums, messages
Re: MySQL Query

Posted by Dave Thomas on 08/29/05 18:32

ZeldorBlat wrote:
> Either don't include them in the insert:
>
> insert into data (name, email) values ('$name', '$email')
>
> or make the variable 'null' (literally). Something like:
>
> $age = !empty($age) ? $age : 'null'; //'null' is a string containing
> the word 'null'
>
> Then do your query as before.
>

I was trying to do it without having to take it out of the query or
assign it NULL... just because there are a large number of variables
that could be empty.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация