Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: input form and MySQL across columns

by philiprbrenan (Monk)
on Sep 02, 2012 at 22:59 UTC ( #991336=note: print w/replies, xml ) Need Help??

in reply to input form and MySQL across columns

If you name the input fields like this using a character say - that you know will not occur in your item names:

<input name="Shoes-1" size=2> <input name="Shoes-2" size=2> <input name="Shoes-3" size=2> <input name="Shoes-4" size=2> <input name="Shoes-5" size=2>

and likewise Tires etc. then it will be easy for you to test whether the form has sent you back "Shoes-2" etc. and if it has, you can use a SQL Update statement to modify just the one column in one row:

update ... set qty2 = ... where name = "Shoes";

Replies are listed 'Best First'.
Re^2: input form and MySQL across columns
by Anonymous Monk on Sep 03, 2012 at 00:54 UTC
    Naming the input fields with unique names is not an issue, the problem is using multiple input fields on a single row of the MySQL table. I also have working queries to manage the SQL table, again not an issue there. Thanks for your reply.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://991336]
[Discipulus]: just after earthquake mobile phones never work: but they could evacuate to open schoolyard and then call or go back to school
[LanX]: "evacuate to open schoolyard" is standard procedure here
[LanX]: Italy has a problem with Africa, very pushy continent ;-)

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2017-01-18 12:08 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (161 votes). Check out past polls.