...

View Full Version : MySQL Help needed with looking up a record based on a defined element



RobertR
03-15-2009, 05:22 PM
Hi
I'm a newbie to MySQL as you will no doubt guess from my quetion, so please be gentle! :) hehe

Ok my question, I have the following code:

$link = @mysql_query("select *, $element AS text FROM script_data");

mysql_query($queryis) or die(mysql_error());

echo "<br><br>Total: <b>&#36;$total</b><br><br>";

echo "Result: ($link) $element<br><br>";

When I test the results I get the $element field to display the correct ID the script_data table but the $link field returns Resource id #7

Where am I going wrong?

RobertR
03-15-2009, 05:30 PM
Sorry I forgot to mention my script_data table as 2 fields id & text
$id has already been defined as $element, so you know the connection there!

Thanks

Rob



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum