How to update this array?


Posted on 16th Feb 2014 07:03 pm by admin

I am saving a string that looks this: username1, username2, username3...
into a single cell in a database table.
I am doing this so that when I retrieve that string using normal methods, I can turn it into an array.

However, my question is: I will need to update that cell and add user names to it. and then save it back to the database.
I don't have any example code as I haven't started because I am not sure where to start.

This is what I was thinking.

It will start out with one username "username1".
That is what the original value will be. I then need to pull that info out (easy) and populate an array

Code: $original = 'username1';
$userArray = array($original);
I then need to turn around and add 'username2' to $userArray. and add it to the DB so it is formatted as username1, username2, username3..

No comments posted yet

Your Answer:

Login to answer
253 Like 8 Dislike
Previous forums Next forums
Other forums

Need help with cin setw
I made a program here is my code:

#include
#include
#i

Class not found error
I am getting Class 'index' not found in Eval function:

//write config

$pat

BSP Ext - tableView - Sort - NEWBIE
Hi,
I have been trying to get the sort to work. I have defined the column definitions by fillin

a dificult string search
Hi I don't know a way around this. I want the user to input a password, but to make it a bit complca

User registration and login
I don't know whether this is the correct forum, if not i apologise but am pretty desperate at the mo

Change Age automatically
hi guys . im new to php , is it possible to change age value in mysql automatically when year change

MS Exchange 2007 integration with ECC 6.0
Hello Experts,
We have ECC 6.0 and MS Exchange 2007. We need to integrate ECC 6 and MS Excha

utf8_general_ci error ??
I have all kinds of data to be inserted in database table

//I am getting this error

Yo

update post issues
I am trying to create an update to a post function, while the update does occur, the page routing an

PHP4 to PHP5 Conversion
Hi Everyone,

I am working on a site that is built up on PHP4 and each page is being started f

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash