Current location: Hot Scripts Forums » Other Discussions » Database » search problem


search problem

Reply
  #1 (permalink)  
Old 02-22-08, 07:20 AM
jonnekke jonnekke is offline
Code Guru
 
Join Date: Oct 2005
Location: holland!
Posts: 704
Thanks: 0
Thanked 0 Times in 0 Posts
search problem

Hi there... got this sctipt:

PHP Code:

$word $plaats;


if(
$soort == "geen") { $soort "[[:alnum:]]"; }
if(
$kamers == "0") { $kamers "[[:digit:]]"; }
if(
$woonopp == "0") { $woonopp "[[:digit:]]"; }
if(
$perceelopp == "0") { $perceelopp "[[:digit:]]"; }

$result mysql_query("SELECT * FROM aanbod WHERE plaats RLIKE $word AND soort RLIKE '$soort' AND kamers RLIKE '$kamers' AND woonopp >= '$woonopp' AND perceelopp >= '$perceelopp' AND prijs BETWEEN '$prijsvan' AND '$prijstot' ORDER BY prio, id DESC") or die(mysql_error()); 
as soon as one of the "if" things happen I got an error...
Is it possible to use [[:alnum:]] and [[:digit:]] in mysql_query and howe to use
it. this way ain't working..

_j
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Optional search problem SummerL PHP 3 07-22-05 08:21 AM
Search database with multiple AND problem Bonzo PHP 8 07-14-05 03:09 PM
another php search mysql problem sumogray PHP 6 06-28-04 09:03 AM
Declared Functions skipper23 PHP 4 12-17-03 11:06 AM
index page not showing up skipper23 PHP 3 12-15-03 02:10 PM


All times are GMT -5. The time now is 08:51 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.