0

hi all
could any 1 help me out.
im trying to find the biggest id number in a db.
the problem is that the "ID" column is saved as "TEXT"(its important to me).
the language im using is PHP.
10x!

tried to use this but it didnt work

$resultt = mysql_query("SELECT MAX(id) FROM object" , $conn);
$row = mysql_fetch_array($resultt);
$num=$row[maxnum];

Edited by mike_2000_17: Fixed formatting

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by severman
0

thanx man
i used it as a text because when i started i didnt want to give auto id, and its easier to work on string in php...
but now i do and instead of changing 20 pages i wanted to change the command...
anyway 10x!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.