I want to store the result of an SQL query in a PHP variable but as an integer, this is my code:
$maxnroviaje=mysql_query("SELECT MAX(NROVIAJE) from viajes");
$nroviajenew=mysql_fetch_assoc($maxnroviaje);
and doing echo on those two variables:
<?php echo $maxnroviaje; ?>
<?php echo $nroviajenew; ?>
what throws me is the following:
Resource id # 15
Notice: Array to string conversion in C: \ xampp \ htdocs \ agent-nav-online \ add-trip.php on line 47 Array