There are two tables: cheats, users. In the cheats table there is a procname column, in this column there is data. You need to make a search for matches in the users table, in the proclist column. In the proclist column, data is stored in one stream, so you need to use like. Wrote such code, but displays the error Array to string conversion in line 39

$qr_result2 = mysql_query("select procname from cheats ") or die(mysql_error()); while($cheat = mysql_fetch_array($qr_result2)){ $qr_result = mysql_query("select * from users WHERE proclist like '%".$cheat."%'") or die(mysql_error()); while($data = mysql_fetch_array($qr_result)){ echo '<center>'. $data['ip'] . '</center>'; } } mysql_close($connect_to_db); 

39 line there

 $qr_result = mysql_query("select * from users WHERE proclist like '%".$cheat ."%'") 

1 answer 1

mysql_fetch_array - returns an array, which means that $cheat is an array, and you are trying to insert it into a string. Therefore, they tell you that it is not possible to convert an array to a string.

Look at what exactly you have in $cheat , most likely you need to write so $cheat[0] .

  • made $ cheat [0], helped) thanks for some reason, it displayed a record 4 times, although there is one record in the users table - Drop
  • @Drop can be four entries in the cheats ?) And you need to take just the procname depending on the user? it is necessary to watch what you have, what you do and what you want) - stranger in the day
  • more than 100 entries are in cheats - Drop