Answer the question
In order to leave comments, you need to log in
How to pull out from the table all records in which the field "user"=$search?
It is necessary to pull out from the table all records in which the field "user"=$search and further to deduce in the table.
Here is an example, but it displays only one record - the last one, and all records are needed in which the field "user" = $search.
$result = mysql_query("SELECT * FROM table WHERE user='$search'",$db);
while ($myrow = mysql_fetch_array($result))
{
$th1 = '<th>'.$myrow['php'].'</th>';
$th2 = '<th>'.$myrow['code'].'</th>';
}
Answer the question
In order to leave comments, you need to log in
$result = mysql_query("SELECT * FROM table WHERE user='$search'",$db);
while ($myrow = mysql_fetch_array($result))
{
$th1 .= '<th>'.$myrow['php'].'</th>';
$th2 .= '<th>'.$myrow['code'].'</th>';
}
$result = mysql_query("SELECT * FROM table WHERE user='$search'",$db);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question