I want insert some data to a table of the wordpress then return it's auto increase id value.
I do this but both of these has error:
This code word well in MySql but by
I get this error:
<blockquote>
You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'SELECT LAST_INSERT_ID()' at line 1
</blockquote>
I call this statement by
and also
, but both of them has that error.
I don't want use
for some reasons and I should use this type of code.
I do this but both of these has error:
Code:
INSERT INTO wp_sho_app_form (job_id, first_name, last_name) VALUES(1, 'Caldwell', 'Estrada');
SELECT LAST_INSERT_ID();
This code word well in MySql but by
Code:
$wpdb
<blockquote>
You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'SELECT LAST_INSERT_ID()' at line 1
</blockquote>
I call this statement by
Code:
$wpdb->query
Code:
$wpdb->get_results
I don't want use
Code:
$wpdb->insert