![]() |
renaming $
$sql = "SELECT count(*) FROM uploadimages";
$sql2 = mysql_query($sql); $id2 = mysql_result($sql2); $id = $id2 + 1; ----- This is not for mysql... though there is a mysql_query later using auto_increment. ^^ As i said though its for variable |
What's the problem - not quite following as you haven't said what problem you're encountering or what you're trying to do :)
|
Basically...
it renames the file dependant on an id.... its easily added due to mysql's auto increment, but i want to rename the file before hand, so i want a query getting latest id then when done ill add a 1. |
You mean for example when you add something to the database you want to get the id that was just created assosciated with that record? If so use mysql_insert_id :)
|
All times are GMT. The time now is 07:02 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|