[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
 

håndtere fejl i mysql querys



Hejsa

Jeg har et felt i html hvor brugeren kan indtaste et regexp. Dette 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 "*".


Jeg ku' selvf' skrive en funktion i php som checker hvorvidt en streng er et gyldigt regexp, men kan man ikke lave noget exception-agtigt (som jeg kender det fra python) så man får checket forærende af samme software (mysql) som potentielt fejler???

Eller er der en smart måde jeg ikke har fantaseret mig til?

--
Peace, love & harmony
Atte

http://www.atte.dk

 
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] *