The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.28 (Linux)
|
Error after renaming columns - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Error after renaming columns (/showthread.php?tid=539) |
Error after renaming columns - filch - Feb 26th, 2010 Hi Ben, thought I would start a new thread on this one as the other is almost solved and this was a different issue. I might have made a mistake here by renaming the columns (col1 ... col2 etc) in the DB section of formtools. I wanted the columns to have more recognizable names. However now, when I try to view the submissions, I get the following error: Code: Failed query in ft_search_submissions: Seems to be something in the sort order code, which would make sense. Can you direct me to this code so I can perhaps replace the old column names with the new ones? Or, will this screw up my other forms? Dave RE: Error after renaming columns - filch - Feb 26th, 2010 Ben, I just rebuilt the form as I needed it running. However, still would like to know why this broke and/or how to change the column names without breaking the form. Dave RE: Error after renaming columns - Ben - Mar 7th, 2010 Hey Dave, VERY interesting...! I've encountered this myself a couple of times when I was manually editing the database table fields, but never just from updating the fields from within Form Tools. By the sounds of it, what happened was that when you updated the database column fields on the Edit Form -> Database tab, the query to update the database table column names ran properly but the DB column field update query DIDN'T. So you then had a discrepancy which FT couldn't reconcile. I looked at the code and it doesn't have any sort of rollback code in place to ensure the DB table col names and database records are always in synch. This is bad. I'll log this as a bug and fix it in an upcoming build. Thanks Dave. - Ben RE: Error after renaming columns - maxcreigs - Mar 10th, 2010 Are you sure you have Alter privileges on that classic table? If not, do you have "ALTER ANY TABLE" privileges? If that doesn't work, maybe you need the CREATE ANY INDEX privilege. In addition, if you are not the owner of the table, you need the DROP ANY TABLE privilege RE: Error after renaming columns - filch - Mar 10th, 2010 Thanks for your input. I own the server and as such, it is totally within my control and in most cases, including this one, I set myself up with all priviledges, including ALTER. Thanks Dave (Mar 10th, 2010, 1:19 AM)maxcreigs Wrote: Are you sure you have Alter privileges on that classic table? RE: Error after renaming columns - Ben - Mar 11th, 2010 (Mar 10th, 2010, 1:19 AM)maxcreigs Wrote: Are you sure you have Alter privileges on that classic table? Good call, though. This was a likely cause. |