السلام عليكم
برمجت سكريبت عقاري
وو اجهتني مشكلة في محرك البحث
كما في الصورة
إستخدمت في الإستعلام OR و AND
وماشي فايده
فكرة البحث
إن الزائر يختار بعض الخيارات (كما في الصورة) أو كل الخيارات أو لايختار أي خيار حتى يكون البحث شامل
فكيف يكون الإستعلام إختياري؟
$SQL=mysql_query("SELECT * FROM real_estate WHERE BINARY location LIKE '$location' and type LIKE '$type' and forx LIKE '$forx' and numbathrooms LIKE '$numbathrooms' and numbedrooms LIKE '$numbedrooms' ORDER BY sort") or die (mysql_error());المتغيرات
$location= $HTTP_POST_VARS['location']; $type= $HTTP_POST_VARS['type']; $forx= $HTTP_POST_VARS['forx']; $numbathrooms= $HTTP_POST_VARS['numbathrooms']; $numbedrooms= $HTTP_POST_VARS['numbedrooms'];