Okay
  Public Ticket #2792521
edit sql table
Closed

Comments

  • Joseph Nickerson started the conversation

    I have configured a "Separate DB Connection" with a successful connection message. I have created a table linked to an existing data source. I have created a table with  `id` int(8) NOT NULL AUTO_INCREMENT as the first column. I added the SQL query to the database table (SELECT * FROM rocker.pn221370;) and that successfully shows my table. I have enabled server-side processing. I have allowed front-end editing. I can successfully edit the table on a WordPress page, but when I try to save it I get an error message stating that "rocker.pn221370 does not exist".

  • [deleted] replied

    Hi Joseph

    Thank you for reaching out to us.

    Please remove the semicolon at the end of the table name and it should work fine

    7503547211.png

    Do let us know if you need any further assistance.

  • Joseph Nickerson replied

    I have removed the semicolon and now I get the following error:

    Error! There was an error trying to update the row! Error: Table 'wordpress.rocker.pn221370' doesn't exist

  • [deleted] replied

    Please provide me a temporary WP-admin (administrator) user for your site where this happens and the table ID, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. 

    We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course, we do not provide login data to third parties. 

    You can write credentials here just check PRIVATE Reply so nobody can see them except us.

  • Joseph Nickerson replied

    Blaženka,

    Unfortunately this is a client site that's behind their firewall. I can only reach by VPN and don't have access to the pre-shared key. I'm available to meet on MS Teams or Zoom or any other screen sharing platform if that's possible?

    Thanks,

    Joe


  • [deleted] replied

    Unfortunately we do not provide support over screen sharing platforms.

    Can you clone the website?

    If yes - I'll ask you to install the Duplicator plugin. It will generate a couple of files which you can send me (along with the log-in credentials), and then I can create an exact copy of your website, see what the issue is and try to resolve it.

    Please note that the files will be too large to attach to the ticket, so you can upload them via wetransfer.com and just send me the link.

  • Joseph Nickerson replied

    I have downloaded & ran Duplicator plugin. Do you need the installer and the archive?



  • Joseph Nickerson replied

    Blaženka

    I have sent to your email as requested.

    Thanks,

    Joe

  • [deleted] replied

    Hi Joseph

    Thank you, we will look into this shortly and get back to you.

    Thank you for your time and patience.

  • Joseph Nickerson replied

    Thanks!

  • [deleted] replied

    Hi Joseph

    Thank you for your patience.

    The database name of the separate DB connection is rocker. So, in the query, there's no need to include it. If the table pn221370 exists in that database, you can easily create it with SELECT * FROM pn221370

    We can't see the connection above the query, because you cut off the screenshots. One of the errors from your screenshots say "Table 'wordpress.pn221370;' doesn't exist", so even though you created a separate DB connection, you may not have selected it from the drop-down when you were creating the table. 

    9943067427.png


    We also don't see the table, so we don't know if you have an auto-increment integer column, which is necessary for editing. We can see a column "id" in the Editing tab screenshot, but is it an auto-increment column? The MySQL table name with the semi-colon is definitely wrong, so you should keep that.

    We will need to have the dump of that separate DB that you included. We can't test it without that database.


  • Joseph Nickerson replied

    Hi Blaženka,

    I didn't see the connection drop down originally. I have created a new database table, and a new wpDataTable table and added the "Rocker" database. I believe this solves the original issue.

    Now I have a different error I'm hoping you can help with. It doesn't seem to like the quotes around the column names. (see attachments). 

    Thanks,

    Joe

  • Joseph Nickerson replied

    Hi Blaženka,

    Disregard the last post, I found that there was a pesky semicolon on the "EDIT" screen (MySQL table name for editing) after the database name. I removed the semicolon & all is working as expected now.

    Thanks!

    Joe

  • [deleted] replied

    Hi Joe

    Adding spaces in the column name, accent graves ( ` ) around column names and adding a semi-colon at the end of the query ( ; ) can also cause issues, so if you have them, please remove them. 

    So, remove spaces and quotes from column headers in the query, and remove all accent graves ( ` ).

    You can always modify the displayed header of columns when you go to column settings, but this query should exclude all possible issues with the SQL parser.


  • [deleted] replied

    Perfect, I'm glad to hear you managed to resolve the issuesmile.png

    If you have any other issue or question please open new ticket, and we help you out.

    I’d like to ask you a favor. Would you mind taking a few minutes to write a review for us, please on this link

    Our free version is the only place where we can have proof for our hard work; your comments are beneficial for others to know what to expect when they’re looking for our plugin.

    Thank you in advance. It means a lot to us, and I am looking forward to reading your comment.