Hi, I hope some one can help me here!
I have 2 tables (mysql & PHP4.4.8). The first table has 3 columns,
ID : numbers : Sold
From this, I'm getting a query result based on how many 'numbers' are requested.. ($numberlimit is however many groups of numbers the user has asked for)
"SELECT * FROM tblnumbers LIMIT $numberlimit "
What i'm after is the numbers column, and say they spill out as
001
002
003
004
005
006
(Not incremental, I've made the number result up)
What I want to do is get those initial numbers, update their status in that table's 'sold' column to 'YES' and then insert the numbers into a new table so that they are associated with the user, who's info is held in a session;, structure as follows,
numbers : user
So, the question is, how do I get multiple data (in this instance, the first 6 numbers) update the original table to say that the number has gone, and then insert the numbers gained from the query into the new table so they are associated with a user.
In a perfect world I'd quite like to do it whilst balancing a pint of guiness on my head, but.. one problem at a time 😃
thanks for any help
trev