|
-
Nov 9th, 2006, 10:27 AM
#1
Thread Starter
Frenzied Member
getting last record from DB
I have a field on my page, that i want to be pre filled in.
I want the field to be prefilled in withthe last "PASC ID" +1 thats in my db
I have this code:
<span style="font-size:small;font:sans serif;">PASC Ref #:</span>
<input type="text" name="pascref" size="20" maxlenght="20" value="<?php
//not sure what to put here
I know i want to query my DB, but i dont know how to get the last entry in PASC_ID table in my DB, then ADD 1 to it, so right now the PASC_ID are like "PASC 101", so when they go to the page, i wanted it to go into the db, and get the last value, and in the value of that text field it says "PASC 102"
?>" />
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|