Help Please With Purchased Code

Hi,

I paid someone to organise my DB which is fine and to provide the code to query it. However, it is not in the format I am looking for. I have my site laid out so the can echo each field separately:

<?php echo $row['product_id']; ?>

He tells me I need to change it to mysql_fetch_assoc and change the row to list($name, $link, …)

[code]$room = mysql_real_escape_string($_GET[‘room’]);

$query = mysql_query(“SELECT name
FROM productdbase
JOIN furniture_groups
ON (furniture_groups.long_name = productdbase.furniture_group)
WHERE room = ‘$room’”);

while(list($product) = mysql_fetch_row($query))
echo $product;[/code]

Hi,

looks like he already told you how to fix it.

I need to change it to mysql_fetch_assoc and change the row to list($name, $link, ....)

So in the code
[php]
while(list($product) = mysql_fetch_row($query))
{…
[/php]
You change the list (add the other elements).
BTW, your query yields just the ‘name’ field. If you’re going to fill more variables, make sure you add those fields to your query too.

Good luck.
O.

Thanks,

But I am completely new to PHP and I dont know how to do what he is suggesting.

Sponsor our Newsletter | Privacy Policy | Terms of Service