Jump to content

gopichand

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

gopichand's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. am using a list box in the front end and the user selects more than one option from the list box..all these options must go into a single column in a table of the datbase..only one value is getting inserted into the column with the query here and moreover it is generating an error ..How to insert all the selected values into a single dabatase column,I hope u understood this? $query = "INSERT INTO tutorials (uid, name, dname, cname, date, description, Keywords, SLO) VALUES ('" . $user . "','" . $name . "','" . $dname . "','" . $cname . "','" . $date \ . "','" . $description . "','" . $_POST['Keywords'] . "','" . join("'), ('", $_POST['name_here']) . "')"; This query is generating the following error INSERT INTO tutorials (uid, name, dname, cname, date, description, Keywords, SLO) VALUES ('22','akkf','kajfkafka','kasjfk','1157560060','kdfakf','fjakfaj','9'), ('8'), ('7')Column count doesn't match value count at row 2 How to solve this problem?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.