I am trying to use the output of an SQL query (in this case the output will be something like 26 "http://www.google.com"
I want to use the id and address in a process in php but cant seem to do anything with the output of the query other than echo it.
ultimately if i could end up with $id and $pos as variables that i could use that would be great.
<?php
$con = mysql_connect("localhost","root","root");
if (!$con) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db("movieCol", $con);
$query = "SELECT * FROM `movie_collection` ORDER BY `id` DESC LIMIT 1";
$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array($result) or die(mysql_error());
echo $row['id']. " ". $row['poster'];
mysql_close($con);
?>