Jump to content

Code not Working


dudejma

Recommended Posts

<?php
require "db_connect.php";

$current_db = mysql_select_db('virtu857_va');

if (!$current_db) {
   die("Could not select database because: " . mysql_error());
}

$pilotnum = "SELECT max(pilotnum) FROM users";

$result = mysql_query($pilotnum);

if (!$result) {
   die("Error: " . mysql_error());
}

echo $pilotnum;

++$pilotnum; 

echo $pilotnum;

?>

 

Everytime I try to run this code, this is what comes up:

 

SELECT max(pilotnum) FROM usersSELECT max(pilotnum) FROM usert

 

What's wrong? Thanks.

Link to comment
https://forums.phpfreaks.com/topic/239964-code-not-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.