close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How to store two values in 1 field in store summary

Thread began 9/10/2011 1:18 pm by eyoung296270 | Last modified 9/12/2011 7:50 pm by eyoung296270 | 1451 views | 4 replies |

eyoung296270

How to store two values in 1 field in store summary

I have a new field in my orders table that is named SerialNumber. I want to store the date field as the first6 number and then the OrderId field as the last numbers. I am currently on orderID number 19. I want the SerialNumber field to hold the date and orderID so that the SerialNumber field will look like 11100919.
So my question is how do I bind both values from the confirm page into the store summary. I can get the date there but I don't know what to use as orderId since it is a blank value in the wizard.

Sign in to reply to this post

Jason ByrnesWebAssist

This will not be possible. The value of the orderID column cannot be known until the order record is inserted.


you can create the serial number value in the PHP page that will display the record to the user though, using the CONCAT function to concatenate the orderID and orderDate columns together:

SELECT CONCAT(orderID, '', orderdate) as serailNum FROM orders

Sign in to reply to this post

eyoung296270

Thanks Jason,
I understand. I just need the serial numbers to be 8 digits and to be sequential so that no two are the same. Can you point me in another direction?

Sign in to reply to this post

Jason ByrnesWebAssist

The best solution is the one I provided in my previous reply where you use the CONCAT function to create the serial number at run time

The CONCAT function will create the serial number for you by programmatic combining the orderID and orderDate column when you display the information to the user. you dont need to store the serial in a separate column, just combine the two columns IN The SQL when the order info is requested by the user.

Sign in to reply to this post

eyoung296270

Thanks, that is what i did.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...