Hi Aravindh,
You can use the Data Explorer to perform SQL insert and update statements. You can also perform multiple SQL statements at once (one file). Make sure that every SQL statement ends with a ; and a new line.
Can you confirm that your SQL statements end with a ; and a new line?
Best regards,
Peter
I’m using this query inside sql file
UPDATE wp_postmeta SET meta_value=’sampleTest1′ WHERE post_id = 1;
UPDATE wp_postmeta SET meta_value=’sampleTest2′ WHERE post_id = 2;
UPDATE wp_postmeta SET meta_value=’sampleTest3′ WHERE post_id = 3;
but it not working for me.
result : INFO: Imported 0 rows (2 failed).
Insert query alone working for me.
-
This reply was modified 6 years, 1 month ago by
aravinddhiva.
-
This reply was modified 6 years, 1 month ago by
aravinddhiva.
Hi Aravindh,
From where are you running your script? From the Data Explorer main page or a Data Explorer table page?
If you explorer a specific table and click the import button on that page, you can only import rows for that table. If you want to perform an update, you must run your script directly on the Data Explorer main page.
This is a security issue. If you give users access to specific tables, they can only insert data into that table. A user must have admin privileges to perform update or delete statements.
Can you try to run your script directly from the Data Explorer main page?
Best regards,
Peter
Hi Peter,
I tried to run the script directly from the Data Explorer main page. It comes like
ERROR: Import test.sql failed [check import file]
Can you send me your script file Aravindh? Wanna test if it works on my computer.
Thanks,
Peter
Hi Peter,
Can you share mail id
Inside the script file, only three update statement is present.
UPDATE wp_postmeta SET meta_value=’sampleTest1′ WHERE post_id = 1;
UPDATE wp_postmeta SET meta_value=’sampleTest2′ WHERE post_id = 2;
UPDATE wp_postmeta SET meta_value=’sampleTest3′ WHERE post_id = 3;
-
This reply was modified 6 years, 1 month ago by
aravinddhiva.
You can send me a message on the plugin website: wpdataaccess.com
Please scroll down and look for contactform. I’ll reply to your mail.
Best regards,
Peter