1. Do I have to use the mysql_close in a UDT? (it works without error when not supplied)
2. Will it leave the connection open? or is it closed with cmsms's tag
I have a UDT that opens a table on the same database that cmsms is on.
I get the Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource
Here is what I am using:
Code: Select all
$result = mysql_query("SELECT * FROM image_items WHERE id IN (590, 594, 591, 673, 574, 553, 568, 698)");
while($row = mysql_fetch_array($result))
{
echo "<a href=\"/images/catalog.php?id=" . $row["id"] . "\">
<img class=\"acc_img\" src=\"/images/" . $row["file_thumb"] . "\" border=0 alt=\"" . $row["title"] . "\">
</a>";
echo '<table><tr>';
{
$i++;
if ($i % 5 == 0) {
echo '<td><span style="font-weight:bold;"> '. $row["title"] .'<br>'. $row["item"] .' <span style="color:#000099;"> $'. $row["price"] .' </span></span></td></tr><tr>';
}else{
echo '<td><span style="font-weight:bold;"> '. $row["title"] .'<br>'. $row["item"] .' <span style="color:#000099;"> $'. $row["price"] .' </span></span></td>';
}
}
echo '</tr></table>';
}
mysql_close($result);