[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] håndtere fejl i mysql querys



Atte Andre Jensen <sslug@sslug> writes:

> sendes så videre i en mysql-query som
> <snip> SELECT bla FROM customer WHERE companyname REGEXP ".*"
> </snip>. Problemet er bare at mysql brækker sig hvis brugeren
> indtaster en ikke-gyldig streng som regexp, fx "*".

Du tjekker på mysql_errno:

if(mysql_errno() != 0) {
    echo "FEJL: " . mysql_error()
}
  
-- 
 Peter Makholm     |                The four letter word beginning with L?
 sslug@sslug |                It's life, love, libc or lisp         
 http://hacking.dk |                    --  Depending on you point of view


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *