/*thanks in advance for any advice, i want to use the results of a one query with another query as shown below, it dont seem to be working too well, as it prints out the results below.
this select MAX(offender_no) from offenders;<<this is printed out when query one is echoed
Resource id #2 ;<<this is printed out when query two is echoed*/
<?php
pg_connect("dbname=dlr user=ma102so") or die("Couldn't Connect: ".pg_last_error());
$query = "select MAX(offender_no) from offenders;";
$query = pg_query($query);/ exercutes the query/
$row = pg_fetch_array($query);/gets the array/
$result=$row["offender_no"];/gets the requested record/
$query2 = "select * from civil_fines where offender = '$result';";
$query2 = pg_query($query2);/ exercutes the query/
if($query)
echo "$query $query2" ;
else{
echo "There was an error! ".pg_last_error();
}
?>