Re: Empty Array?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> At 7:43 AM -0400 10/5/07, Dan Shirah wrote:
> >Ah, what a lovely case of the Friday morning brain farts!
> >
> >I have a query that selects some data from a table based on the current ID
> >selected.
> >
> >If the query does not return any results, I want it to continue to another
> >query that will insert a record into the table.

if you don't actually need to know inside of PHP whether or not it
exists, you can skip the PHP work and have mysql do it for you:

http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux