Google Answers Logo
View Question
 
Q: php/mysql...Updating part of one record ( No Answer,   1 Comment )
Question  
Subject: php/mysql...Updating part of one record
Category: Miscellaneous
Asked by: flyguylol-ga
List Price: $10.00
Posted: 24 Feb 2006 14:53 PST
Expires: 28 Feb 2006 10:28 PST
Question ID: 700611
Hello,

I have a record in my sql database that contains a string of numbers, such as...
     
    124,125,126,127,128,124,125,126,127,128,124,125,126,127,128,124,

...each of these numbers represents an "ID". I have a page with
multiple checkboxes.  Each checkbox represents one of these values. 
Upon submit, I need the selected checkbox values to be deleted from
this record.  For example, if someone clicks on the checkbox with the
value '124', the record should look like:

     125,126,127,128,125,126,127,128,125,126,127,128,

If two checkboxes are clicked with values of '127' and '126', the
record should look like:

     124,125,128,124,125,128,124,125,128,124,

Hope this makes sense!
Thank-you in advance
Answer  
There is no answer at this time.

Comments  
Subject: Re: php/mysql...Updating part of one record
From: answerguru-ga on 24 Feb 2006 14:59 PST
 
Hello,

This doesn't appear to be a very efficient way of storing
values...personally I would prefer a seperate row for each value in
the list.

If you are tied to this model, it would be best to retrieve the
string, process it in code, and then insert the result as an update.

answerguru-ga

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy