Hi there, I am doing a simple SELECT statement for mysql database. My Field is a type int (3) and has the number 1 in it, that's all. When I do a select of that field and echo it to the page, when it should say $result=1 instead it says $result="Reference #1" what in the world is this? Why am I getting this data? Thanks in advance! Tin
try this: $result = mysql_query("select * from fieldname where columnname = 1");
if ($result) { while ($row = mysql_fetch_array($result)) { $number = $row["columnname"]; echo $number; } } else { echo mysql_error(); }
Ok, so even though i know I'm only getting one result, I still have to do the array as if I'm selecting many fields? Oh, and by the way, my name is Angela too, lol! What a coincidence!
that's it :-)
what's more of a coincidence is meeting someone on a chatline that shares your name, location, age, and is a twin just like you.
hehehe.