$wpdb->insert issue
-
Hi,
First time writing a plugin for WordPress. I am trying to insert data into wp_wptest, a table I created in the database. The below code inserts 12 rows in the database instead of one. The string “INSERT” only prints once in the page source. I only want to insert one row in the db. Here is the code:
echo "INSERT" . "<br />"; $this->m_pathlogo = "AAAAA.gif"; $this->m_customerid = 1; $dbfields["customerid"] = $this->m_customerid; $dbfields["pathlogo"] = $this->m_pathlogo; $dbfields["date"] = "now()"; $wpdb->insert( 'wp_wptest', $dbfields);Thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘$wpdb->insert issue’ is closed to new replies.