Reply to Re: PHP/MySQL warnings about results

Your name:

Reply:


Posted by Knut Krueger on 11/28/07 10:42

Jerry Stuckle schrieb:

>> Why should I branch to the same code with an additional SQL query
>> before instead of suppressing the error and using one big switch case
>> selection and one of them is the error branch. In both cases there is
>> an used and working error procedure.
>>
>
> As others here have tried to tell you - you should have two functions.
> One you use for SELECT statements, where you need the results returned.
> The other for queries other than SELECT. The program calls the
> appropriate function.
Jerry, you snipped the wrong part:
> but back to the OP in this case I would agree to determinate whether there is better to determinate before whether it is INSERT, UPDATE or DELETE. This would use the right resources for that branch

you see full acknowledge

I answered to Michael:
>> Using '@' is really bad style in most cases. It suppresses the error
>> message instead of fixing it.
> but it is better to supress one error instead of setting error_reporting off, isn`t it?

Normally I set error_reporting(E_ALL);
so I would like to see all errors
and you answered:
>
> It's better to not cause the error in the first place.

And after that the tread goes the wrong way


I am using the @ f.e in one way.
There are tables which are proved after the registration process
f.e are there values in a couple of fields, is the additional table
inserted and filled etc.
So I tried to fix any error "in the first place"
If the table with id XY is not present it is an really unrealistic error
caused by manual deleting the table with phpmyadmin.

But this error is included in the proof function from those selected
data before updating the data.

So could you give me an good explanation why I should test whether the
table is existent and update the data after a positive answer, except
that I realize the error two lines earlier one times in 10 years?

and at least I did not say anything else than Michael

Knut

[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

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