Ok, I am writing a block for phpNuke (not that that really matters) but my SQL is returning data not in the tables. First off.. here is the code:
<?
$db_connection = mysql_connect("localhost", "username", "password")
or die("Could not connect to DB");
mysql_select_db ("ratesocal", $db_connection)
or die("Could not find to DB");
$img_query = "SELECT chiff FROM voting ORDER BY media DESC LIMIT 1";
$type_query = "SELECT typ FROM voting ORDER BY media DESC LIMIT 1";
$image = mysql_query ($img_query, $db_connection);
$type = mysql_query ($type_query, $db_connection);
$content = "Test for top picture<br><br> <img src=\"http://nuke.ratesocal.com/modules/vota/ ... mage.$type\">";
?>
Its supposed to return jpg for the $type and 337374747 for the $image but instead it returns
Resource%20id%20#90
and
Resource id #91
If I run the SQL Queries in phpMyAdmin I get the correct results.
Any ideas all?
Jiles
jiles@jiles.org
php MySQL queryhelp needed from you GODS! :-)
Moderator: General Moderators
take a look at these manual pages
http://www.php.net/manual/en/function.mysql-query.php
http://www.php.net/manual/en/function.m ... ch-row.php
http://www.php.net/manual/en/function.mysql-query.php
http://www.php.net/manual/en/function.m ... ch-row.php