I have a database with 2 columns, one of type int and other of type varchar.
When i try to get tha name with id=1 for example, the query works fine:
$name = mysql_query("SELECT Name FROM stations_id WHERE id=1");
$a = mysql_fetch_array($name);
echo $a['Name'];
I try to do the opposite but i cant get the integer value. For example:
$id = mysql_query("SELECT id FROM stations_id WHERE Name='Mike'");
$a = mysql_fetch_array($id);
echo $a['id'];
I want to get the type as an integer so i can use it in a function. Can somebody help me plz?