
Headhunter
|
| Posted: 06/23/2003, 11:48 PM |
|
Project: PhP4 + MySQL + CCS + Linux
In my project I have a detail page from a car which data is stored in 1 table. In another table called "car_options" I store all options related to a specific car.
In my detail grid I want to list the options comma seperated.
for example, "Automatic gears, Leather interior, ..."
I made a label for this and added the "before show event" to this label like this (with simplified query):
global $cars;
$db = new clsDBcarportal();
$SQL = "Select option from car_options where car_id = $car_id";
$db->query($SQL);
$Result = $db->next_record();
while($row = mysql_fetch_array($Result))
$lbl_value=implode(" ", $row);
unset($db);
$cars->tag_id->SetValue($lbl_value);
The thing I want to do is store the db query in an array and implode the array to retrieve one line of text with all retrieved records.
Since I'm very bad at hand coding I cannot find the sollution. I think the "next_record" function already stores the result in an array, but I'm not sure.
So what I get at the moment is this error:
mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/html/geeco/cars_detail_events.php on line 29
Can someone help me with this?
THX
|
|
|
 |
Tim
|
| Posted: 06/24/2003, 1:16 PM |
|
Would this help? http://support.codecharge.com/kb_article.asp?kb_article...4&article_id=59
|
|
|
 |
|

|