This question already has an answer here:
I am stuck with the following error:
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/****/public_html/10minutes8983.php on line 23
and I'm completely lost as to why since I have used this method for getting something from db many times before..
Below is line 23 and 24.
LINE 23:$find = mysql_fetch_array(mysql_query("SELECT user FROM $tab[pimp] WHERE id='$id';"));
LINE 24:$user = mysql_fetch_array(mysql_query("SELECT turbo,platinum,gold,silver FROM $tab[user] WHERE username='$find[0]';"));
Anyone have any ideas about why this is occuring?
Many thanks!
</div>
Try using {} brackets {$tab[pimp]} inside the query string, just like below:
LINE 23: $find = mysql_fetch_array(mysql_query("SELECT user FROM {$tab[pimp]} WHERE id='$id';"));