Hello again,
Now I have different problem, which I cannot solve.
Here is the problematik source cod :
<?php
$lst1 = mysql_query("SELECT id, brand, vid FROM table1 WHERE vid = 'rdtelpl' GROUP BY brand", $dbh);
while(list($id, $brand, $vid) = mysql_fetch_row($lst1)) {
echo "<tr><td>$brand</td><td>$brand</td><td>$brand</td></tr>";
echo "\n";
}
?>
The result from this query is that it repeats the one value of $brand 3 times by one row, and the next value of $brand gives me on the second row again 3 times for each cell.
I do not want this to happen, I want the result from this query to be on one row to give me 3 different values from $brand and if there are more values to give me one the second, third etc. row.
What should I change in this script to work properly??? Should I do something with ID or to use some king of an array to keep the results from the query.
Thank you in advance.
Now I have different problem, which I cannot solve.
Here is the problematik source cod :
<?php
$lst1 = mysql_query("SELECT id, brand, vid FROM table1 WHERE vid = 'rdtelpl' GROUP BY brand", $dbh);
while(list($id, $brand, $vid) = mysql_fetch_row($lst1)) {
echo "<tr><td>$brand</td><td>$brand</td><td>$brand</td></tr>";
echo "\n";
}
?>
The result from this query is that it repeats the one value of $brand 3 times by one row, and the next value of $brand gives me on the second row again 3 times for each cell.
I do not want this to happen, I want the result from this query to be on one row to give me 3 different values from $brand and if there are more values to give me one the second, third etc. row.
What should I change in this script to work properly??? Should I do something with ID or to use some king of an array to keep the results from the query.
Thank you in advance.