Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

online reference to mysql_errno() codes?

 
   Database Forums (Home) -> PHP RSS
Next:  Problem with totaling  
Author Message
Will Woodhull

External


Since: Aug 05, 2005
Posts: 6



(Msg. 1) Posted: Fri Aug 05, 2005 9:26 am
Post subject: online reference to mysql_errno() codes?
Archived from groups: comp>lang>php (more info?)

I want to do something like this:

while(false == ($result = mysql_query($query)) ) {
switch(mysql_errno()) {
case $fixableError[0]:
case $fixableError[1]:
/* fix the errors */
break;
default:
die ("Fatal error in '$query': " . mysql_error() );
break;
}
}

But I haven't found a satisfactory reference to the error codes. My
googling has returned tonnes of references to files in the PHP source,
but I'm not willing to download the source files and I doubt that
they'd have the kind of error descriptions that would be useful (like,
suggestions on how to avoid the error).

So can someone supply an address to a reference list of these error
numbers?

Also, would the syntax in the "while" clause above work in PHP?

TIA,
Will

 >> Stay informed about: online reference to mysql_errno() codes? 
Back to top
Login to vote
Will Woodhull

External


Since: Aug 05, 2005
Posts: 6



(Msg. 2) Posted: Fri Aug 05, 2005 2:31 pm
Post subject: Re: online reference to mysql_errno() codes? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks for the reply, Mario. Though I don't understand the relevance of
your remark.

Mario B. wrote:
> 05.08.2005 18:26:27 Will Woodhull je napisao/la:
>
> > I want to do something like this:
> >
> > while(false == ($result = mysql_query($query)) ) {
> > switch(mysql_errno()) {
<snip>
>
> this is why "try, case, exception" is needed, but i don't miss it one bit
> in php Smile

I know I could use PHP's try...catch construction but it seems like
overkill in the simple code I'm developing. And I think I would still
need to identify the error codes, so a reference list would still be
useful?

Maybe I'm missing something?

 >> Stay informed about: online reference to mysql_errno() codes? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Need help with codes - Need to resize - Hi, I am having problems resizing a text. What is wrong with the script? <td><size=6>For payment information, please contact us at (021) 221100 or at <a href="mailto:info@altha.com">info@altha.com</a></size></t...

Simple text file reading codes NOT working - My PHP code to read a simple text file is listed below. What could have gone wrong here? When I run it, the browser displays: 'COULD NOT Read' opton of the fread() function. I thought the code was OK. <?php $visitorFile="counter.txt&q...

database of zip codes to latitude-longitude coordinates? - Hi, Does anyone know of where I can get a free (or reasonably priced) database of US zip codes and the latitude/longitude coordinates that correspond to them? I'm using PHP 4.4.4 and MySQL 5.0. Thanks for any advice, - Dave

I'm online - Hi, I want to make a script that checks if it can "ping" a certain IP (mine) and inform others whether I'm online or not. Can this be done? -- -Gernot int main(int argc, char** argv) {printf ("%silto%c%cf%cgl%ssic%ccom%c", &quot...

PHP Online Quiz - Hello Group, I'm searching for an opensource php quiz that allows for multiple answers. Instead of using radio button, I'd like to use check boxes. Thanks, --TJ
   Database Forums (Home) -> PHP All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]