php lookup help

hi everyone! its been awhile since I’ve been on here…

I’m doing some updates to a system and I dont know how to create a technical lookup in php…

So i have a database of orders and in each order will have say line1project, line1cost etc so each order can have several projects on the same order for example…

order = L1
line1project line1cost line2project line2cost line3project line3cost
C123 55.00 C155 23.00 C123 2.00

order = L2
line1project line1cost line2project line2cost line3project line3cost
C123 75.00

what i need to do is display all of the costs that are on each order that are associated with a particular project, so for example…

Project C123

Order value
L1 55.00
L1 2.00
L2 75.00

Thanks for any help!

You first need to get the DB design correct. Whenever you start numbering columns it is a sign of a bad Database design. Look up and learn “Database Normalization”.

Sponsor our Newsletter | Privacy Policy | Terms of Service