asadizarch
New Member
سلام
این گوشه ای از کد موتور سرچی هست که نوشتم اما یه اشکال از تابع mysql_fetch_array میگیره
و اینه پیغامش :
***********
**********
این گوشه ای از کد موتور سرچی هست که نوشتم اما یه اشکال از تابع mysql_fetch_array میگیره
و اینه پیغامش :
***********
کد:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\apachefriends\xampp\htdocs\Search1.php on line 23
**********
PHP:
//error message (not found message)
$XX = 'No Record Found';
$query= mysql_query('SELECT * FROM $mytable WHERE $metode LIKE '%$search%' LIMIT 0, 30 ');
while ($row=mysql_fetch_array($query))
{
$variable1=$row['row_name1'];
$variable2=$row['row_name2'];
$variable3=$row['row_name3'];
print ('this is for $variable1, and this print the variable2 end so on...');
}
//below this is the function for no record!!
if (!$variable1)
{
print ('$XX');
}
آخرین ویرایش توسط مدیر: