PHP and MySQL, heres the code I am using...
Code: Select all
<?php
$query="SELECT MAX(item_ID) AS item_ID FROM _account WHERE client = '$client' AND service='$service' LIMIT 1";
if (!mysql_query($query,$connection)) {
echo "Error $query";
exit;
} else {
if($num_rows == 1) {
$row = mysql_fetch_array($query_result);
$item_ID = $row["item_ID"];
echo "num_rows=$num_rows<br />item_ID=$item_ID";
}
}
?>Code: Select all
<?php
$query="SELECT MAX(item_ID) FROM _account WHERE client = '$client' AND service='$service' LIMIT 1";
?>I am totally at a loss here, and I can't seem to find information that goes beond the query which makes me think it is getting the row that is the problem.
Thanks in advance