CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
MySQL- What was the autonumber

 



andy7t
User

Feb 19, 2004, 10:52 AM

Post #1 of 2 (486 views)
MySQL- What was the autonumber Can't Post

Hello,

This is my SQL:


$SQL="INSERT into `tickets` (attachedto,poster,time,date,subject,message,priority,name,email,url,username)
VALUES ('0','$login','$time','$date','$indata{'subject'}','$indata{'message'}','$indata{'priority'}','$indata{'name'}','$indata{'email'}','$indata{'url'}','$indata{'username'}')
";



Now, in fact, before ATTACHEDTO, there is also: id.

This id is an autoincrement and it adds 1 to the last one.

The script is from a online ticket program, and i need to find out what the ID was, so i can say:

Thanks. The ticket has been logged: ID: 21235

etc



Thanks


WP
Novice

Feb 19, 2004, 12:40 PM

Post #2 of 2 (485 views)
Re: [andy7t] MySQL- What was the autonumber [In reply to] Can't Post

$sth->{mysql_insertid}



Regards,
Paul Wilson
Wilson Programming
http://wilsonprograms.com/

(This post was edited by WP on Feb 19, 2004, 12:41 PM)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives