Jump to content


Photo

How to create sequence


  • Please log in to reply
6 replies to this topic

#1 stowell

stowell
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 06 September 2006 - 06:31 AM

Hi Guys,

Someone please help me I dont know how to create a sequence from phpmysql I have a cloumn and i want a default value that will start from 000001,000002,000003...........

Thanks,
Stowell

#2 Moon-Man.net

Moon-Man.net
  • Members
  • PipPipPip
  • Advanced Member
  • 84 posts

Posted 06 September 2006 - 07:13 AM

Have a look at auto int in SQL

#3 stowell

stowell
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 06 September 2006 - 07:18 AM

thanks, but auto_inc only increment by 0,1,2,3 what i want is the default value of the column will be 000001,000002....

#4 Moon-Man.net

Moon-Man.net
  • Members
  • PipPipPip
  • Advanced Member
  • 84 posts

Posted 06 September 2006 - 07:25 AM

Why do you want that? could you store it as auto int, then pad it to the left with so many chars?
What is the applicaion?

#5 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 06 September 2006 - 11:21 AM

smallint 6 zerofilled autoincrement not null
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#6 stowell

stowell
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 08 September 2006 - 10:21 AM

Thanks dude ....

#7 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 08 September 2006 - 10:24 AM

any time good luck.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users