The below script is supose to return the maximum value of returnOrder filed from the forumCatagory table so that I can increment the highest number value by 1 so i can insert it with the catagory. The problem is it is not printing a value. I tested the querry in PHPMyAdmin and it returned the correct value so that is not the problem. I have tried various ways of doing this but I can't remember what it was at the moment (even though i just frickin did it :001_unsure: ) The answer is probably somthing simple but I have been working on home work sense 8:30AM (it is 1:41 AM right now so its been a while) and every thing is begining to blur together but I need to try and get this done today because i work the next few days and then class is saturday (dosent have to be done but I have a lot of scripting to get done and not much time to work on it )
Heres the code:
//Conect to Database
include("userDbConnection.php");
// select highest oreder number and add one to it
$determinOrder="Select max(returnOrder) from forumCatagory";
$orderResult=mysql_query($determinOrder)or die(mysql_error());
$highOrder=mysql_fetch_row($orderResult);
$orderNumber=$highOrder['returnOrder'];
echo $orderNumber;


Sign In
Create Account



Back to top









