September 12th, 2000, 10:19 AM
Is it possible to have a feild in a table auto increment each time a PHP script does a query to the database then displays the result and the link gets clicked?
I am aware of the auto increment function in MySQL but I am not sure how to pass the paramters from from PHP to MySQL to increment the feild.
Any help or pointers in terms of documentation would be greatly apreciated all I need is a starting point.
Thanks to all who took the time to at least look at my post!
September 12th, 2000, 12:12 PM
If your "query" means "select" it's impossible to perform this action for the time of one transaction neither in MySQL nor in MS SQLServer nor in Oracle yet. In case your query is "update or delete" MySQL can't do an auto increment at the same time also. It doesn't have the mechanism of triggers. You need to write 2 different SQL statements in your script firstly to query a database and update special field in some table (and probably to make another query to get meaning of this field).