how can you this with php and mysql?
Posted: Mon Dec 03, 2007 11:13 pm
scottayy | Please use
The weird looking values are fictional shipping instruction numbers that exist for that client.
How would I set up the mysql query to populate those values for every client.
NOTE - Obviously in the shipping_instructions table each record has the client id so thats how I join the tables
I would really appreciate any input on this... One million thanks!
scottayy | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi guys... today I came up with this challenge, and after a few hours I couldnt come up with an answer... So I hope someone can shed some light.
I am populating a <select> field with javascript going through a for loop for someArray that holds the values to be populates. In turn, this javascript array variable was populated by php reading from a mysql database... like this.. while(query stuff){<option>mysql values</option>}. No problem until here.
In the mysql database i have 2 tables: clients and shipping_instructions. So here, one client have have many shipping instructions.
I am already populating a javascript called clientsArray with the data from the mysql query. Now I need to dynamically create and populate one a javascript array for each client so that it holds all the shipping instruction values for that client... like this...
[syntax="javascript"]ClientOneArray = new Array("454rr54r", rr4r544r", 6y7y6yy7");
ClientTwoArray = new Array("454rr54r", rr4r544r", 6y7y6yy7");
ClientThreeArray = new Array("454rr54r", rr4r544r", 6y7y6yy7");How would I set up the mysql query to populate those values for every client.
NOTE - Obviously in the shipping_instructions table each record has the client id so thats how I join the tables
I would really appreciate any input on this... One million thanks!
scottayy | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]