A
A
Anuar Mendubaev2017-03-12 00:00:22
PHP
Anuar Mendubaev, 2017-03-12 00:00:22

How to write values ​​of two arrays to database fields?

Good day to all!

  • There is a parser that parses id's and product descriptions.
  • There is a database that already has the necessary id's, but the "description" column is empty

Question:
How to write the $description value into the "description" field corresponding to the id in the database?
For example, in the database there is id 1 and there is a parsed id 1 and the description "Product Description".
How to make an entry in the 'description' field with id 1?
Here is the whole
PS code: In the request example, description has 0, but it should be $description, but it doesn’t work like that

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly, 2017-03-12
@Frunky

Prepare and execute SQL query

UPDATE <table_name>
SET description=:description
WHERE ID=:id;

* :description and :id are prepared expressions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question