Reply to Re: call a query but if not exist table how manage error?

Your name:

Reply:


Posted by Steve on 11/07/06 15:13

"nawfer" <novalidsforspam@alt.al> wrote in message
news:q0nxxb91azr2$.1xssl0c9k5g35$.dlg@40tude.net...
| IfI want to use a query
| SELECT ID
| FROM table;
|
| 1) what code to use for verify if there is or not the table?

not much reason to go beyond this. if you are designing a site that
generates dynamic PERMANENT tables, your architecture is SERIOUSLY flawed!
temporary tables should NOT span a scope beyond the lifetime of the
executing php script either!

i would stay away from suppressing the query unless you do it in an IF bock
that handles the failure of a query. run the query unsuppressed within a
try/catch block where you actually HANDLE the error...otherwise, your
architecture is SERIOUSLY flawed.

i would stay away from running a query to detect whether or not the table
exists, as you will find that out once you perform your main query anyway.

we could all give you better advice, if you were more descriptive of why you
are trying to do this.

[Back to original 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

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