Re: how to determine where a select statement fails
От | Brent R. Matzelle |
---|---|
Тема | Re: how to determine where a select statement fails |
Дата | |
Msg-id | 20010726180500.15047.qmail@web13002.mail.yahoo.com обсуждение исходный текст |
Ответ на | how to determine where a select statement fails ("Heather Johnson" <hjohnson@nypost.com>) |
Список | pgsql-php |
--- Heather Johnson <hjohnson@nypost.com> wrote: > I am using php to do a select query which returns rows on the > condition that > a conjunction is true in the WHERE clause. This is the SELECT > statement: > > SELECT low_range, high_range, st_name, city, zip FROM router > WHERE st_name = '$st_name' AND city = '$city' AND zip = > '$zip'; > > In the event that the query fails to return any rows, I'd like > to be able to > determine which conjunct caused it to fail. I'm not sure if I understand what your problem is. If a query does not return any rows (pg_numrows() < 1) then that is not really a "failure". If the SQL was incorrect then I would suggest printing it to the browser (echo $query) and pasting it in a query program like psql or winsql to determine which line of code was incorrect. Brent __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
В списке pgsql-php по дате отправления: