H
H
haa2016-04-28 15:45:10
WordPress
haa, 2016-04-28 15:45:10

How to add data using add_metadata() in wordpress?

Good afternoon! Help with the add_metadata() function? Can't add data to database. There is a table wp_favorites, has id, meta_key, meta_value, session_id. How to write this data through add_metadata()?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Kozlov, 2016-04-29
@haa

Google wordpress $wpdb.
$wpdb WordPress class for working in the database.

N
nozzy, 2016-04-28
@nozzy

If it's a custom table, then using add_metadata() won't work, Wordpress doesn't know anything about it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question