Resource id #12?
Posted: Mon Nov 03, 2008 9:27 pm
What is "Resource id #12"?
...and by chance does any one know how I can get this to work without having to include the mysql connection file? I tried passing the $db to the function though that didn't work. Anyway I searched online and couldn't find anything about Resource id #12. It's supposed to be an array of information from MySQL...
...and by chance does any one know how I can get this to work without having to include the mysql connection file? I tried passing the $db to the function though that didn't work. Anyway I searched online and couldn't find anything about Resource id #12. It's supposed to be an array of information from MySQL...
Not sure what I'm doing wrong here? Here's my code...Array([tag_name] => application/xhtml+xml), Array([tag_name] => XML), Array([tag_name] => XHTML), Array([tag_name] => CSS)
Code: Select all
//$mysql_tags = 'SELECT tag_name FROM xhref_tags LEFT JOIN tags ON xhref_tag_id = tag_id WHERE xhref_thread_id = \''.$row['thread_id'].'\'';
//database_tags($mysql_tags);
function database_tags($mysql_query)
{
include("_0_header_01_mysql.php");
//$join2 = "SELECT * FROM xhref_categories INNER JOIN categories ON xhref_categories.category_id=categories.id WHERE xhref_categories.thread_id='".$row1['id']."' ORDER BY categories.name ASC";
$result = mysql_query($mysql_query, $db);
//$row = mysql_fetch_array($mysql_result);
$count = mysql_num_rows($result);
$i=0;
while($i<=$count)
{
$record = mysql_fetch_assoc($result);
print_r($record);
if (!empty($result['tag_name'])) {echo '<a href="index.php?tag='.strtolower(str_replace(" ", "_", htmlspecialchars($result['tag_name']))).'">'.htmlspecialchars($result['tag_name']).'</a>';}
$i++;
if ($i < $count) {echo ', ';}
}
}