post TO sql routine

From: Date: Wed, 12 May 2004 14:59:14 +0000
Subject: post TO sql routine
Groups: php.windows 
Request: Send a blank email to php-windows+get-23687@lists.php.net to get a copy of this message
Hi, Can anyone point me to a routine that will take the POST field and its value and parse it into a suitable sql query. For example: $_POST['title'] is the post var and the user has entered "*good boy +favour -witch". It should produce the following sql snippet ( to form part of the full SQL query when all fields have been parsed: where ... title like '%goodboy' and title like '%favour%' and title not like '%witch%' I'm sure that someone must have developed something like this before. Over my complete system I'd want to do this on about 300 different fields, so you can see why I'd want to relegate it to a class or function. MTIA George in Oxford

« previous php.windows (#23687) next »