Hi
I'm just starting to use chronoforms and seem to have messed things up with the connected table.
If I try to click the form table link I get the following error message.
DB function failed with error number 1064
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 '-request ORDER BY cf_id LIMIT 0,20' at line 1 SQL=SELECT * FROM jos_chronoforms_account-request ORDER BY cf_id LIMIT 0,20
And if I try to create a table I get the following error when pressing save.
Error while creating table :Table 'jos_chronoforms_account-request' already exists SQL=CREATE TABLE `jos_chronoforms_account-request` (`cf_id` INT(11) NOT NULL auto_increment, `uid` VARCHAR(255) NOT NULL, `recordtime` TEXT NOT NULL, `ipaddress` TEXT NOT NULL, `cf_user_id` TEXT NOT NULL, PRIMARY KEY (`cf_id`)) ENGINE = MYISAM ;
System configuration:
Joomla 1.5.7
Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.3 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g
Choronoforms 3.0 stable
DB MySQL 5.0.51a-3ubuntu5.1
DB Collation: utf8_general_ci
What do I need to do, to clean up the configuration so that I can re-create the table from scratch?
best regards
Anders
Joomla 1.5.7
Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.3 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g
Choronoforms 3.0 stable
DB MySQL 5.0.51a-3ubuntu5.1
DB Collation: utf8_general_ci
I'm just starting to use chronoforms and seem to have messed things up with the connected table.
If I try to click the form table link I get the following error message.
DB function failed with error number 1064
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 '-request ORDER BY cf_id LIMIT 0,20' at line 1 SQL=SELECT * FROM jos_chronoforms_account-request ORDER BY cf_id LIMIT 0,20
And if I try to create a table I get the following error when pressing save.
Error while creating table :Table 'jos_chronoforms_account-request' already exists SQL=CREATE TABLE `jos_chronoforms_account-request` (`cf_id` INT(11) NOT NULL auto_increment, `uid` VARCHAR(255) NOT NULL, `recordtime` TEXT NOT NULL, `ipaddress` TEXT NOT NULL, `cf_user_id` TEXT NOT NULL, PRIMARY KEY (`cf_id`)) ENGINE = MYISAM ;
System configuration:
Joomla 1.5.7
Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.3 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g
Choronoforms 3.0 stable
DB MySQL 5.0.51a-3ubuntu5.1
DB Collation: utf8_general_ci
What do I need to do, to clean up the configuration so that I can re-create the table from scratch?
best regards
Anders
Joomla 1.5.7
Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.3 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g
Choronoforms 3.0 stable
DB MySQL 5.0.51a-3ubuntu5.1
DB Collation: utf8_general_ci
Hi ahannover,
You'll probably need to use a MySQL tool like PHPMyAdmin or the EasySQL Joomla extension to drop the existing table. This will also let you check your SQL more easily.
I suspect that the problem is the hyphen/dash in the form name try renaming the form to 'account_request' instead of 'account-request'.
Bob
You'll probably need to use a MySQL tool like PHPMyAdmin or the EasySQL Joomla extension to drop the existing table. This will also let you check your SQL more easily.
I suspect that the problem is the hyphen/dash in the form name try renaming the form to 'account_request' instead of 'account-request'.
Bob
Thanks Bob
I will try to rename the form and see if that works better.
But even if I rename the form I still see it connected in the chronoforms management page.
I guess if I just drop the table there will still be something in the chronoforms configuration linking it to a non existing table?
So I guess the question is how to remove the form - table relationship in the chronoforms configuration?
Any idea?
//Anders
I will try to rename the form and see if that works better.
But even if I rename the form I still see it connected in the chronoforms management page.
I guess if I just drop the table there will still be something in the chronoforms configuration linking it to a non existing table?
So I guess the question is how to remove the form - table relationship in the chronoforms configuration?
Any idea?
//Anders
I figured it out.
1) Rename form.
2) create table
3) change DB connection to the new table that has been created with a new name (since the form name was changed)
4) drop the old table
Thanks
//Anders
1) Rename form.
2) create table
3) change DB connection to the new table that has been created with a new name (since the form name was changed)
4) drop the old table
Thanks
//Anders
If you'd like to 'disconnect' a table from a form without recreating a table, here's how.
You'll need phpmyadmin to edit the appropriate Chronoforms table in the database.
1. Go to the table 'jos_chrono_contact' (your prefix may vary if you're not using 'jos_') and find the record for the form you want to disconnect.
2. Click on the pencil icon to edit the record for your form
3. Scroll down until you see the field called "paramsall"
4. Find the line in the field (mine was the very last one) called "tablenames=" and you should see there the name of DB table the form is linked to.
5. Delete the name of the DB table ONLY so you're left with "tablenames=" (no quotes) in the field
6. Scroll to the bottom of the phpmyadmin page and click Save and Go.
7. Reload the Choronoforms Forms Administration page and bingo, your pesky connected table has disappeared.
BONUS: if you reconnect the table after adding fields to the form and the table, the form will insert subsequent data into the new fields. Could be useful to know in case you need to add fields into a table full of data (not that I'd recommend it...)
You'll need phpmyadmin to edit the appropriate Chronoforms table in the database.
1. Go to the table 'jos_chrono_contact' (your prefix may vary if you're not using 'jos_') and find the record for the form you want to disconnect.
2. Click on the pencil icon to edit the record for your form
3. Scroll down until you see the field called "paramsall"
4. Find the line in the field (mine was the very last one) called "tablenames=" and you should see there the name of DB table the form is linked to.
5. Delete the name of the DB table ONLY so you're left with "tablenames=" (no quotes) in the field
6. Scroll to the bottom of the phpmyadmin page and click Save and Go.
7. Reload the Choronoforms Forms Administration page and bingo, your pesky connected table has disappeared.
BONUS: if you reconnect the table after adding fields to the form and the table, the form will insert subsequent data into the new fields. Could be useful to know in case you need to add fields into a table full of data (not that I'd recommend it...)
Hi Von Steiner,
I'm sure that this will work and I think that you can get the same result in the Form Editor | DB Connection tab by setting the connection to No and de-selecting the table name (ctrl+click on any selected options).
Bob
I'm sure that this will work and I think that you can get the same result in the Form Editor | DB Connection tab by setting the connection to No and de-selecting the table name (ctrl+click on any selected options).
Bob
Hi Bob,
I just tested that and you are absolutely right! Too bad it's not documented anywhere I could see...
I'm extremely impressed both by the functionality of Chronoforms and your fantastic dedication in this forum, but little things like that baffle me! How did you actually find out that Ctrl+click = deselect or is it common knowledge amongst elite coders? ;-)
Regards,
Justin
I just tested that and you are absolutely right! Too bad it's not documented anywhere I could see...
I'm extremely impressed both by the functionality of Chronoforms and your fantastic dedication in this forum, but little things like that baffle me! How did you actually find out that Ctrl+click = deselect or is it common knowledge amongst elite coders? ;-)
Regards,
Justin
Hi Justin,
I'm honestly not sure. I know that you can use Shift+Click & Ctrl+Click to select and deselect multiple options in drop-down boxes (when multiple selection is enabled). I also know quite a bit about the ChronoForms code so just ran a quick test to make sure that it worked here.
Bob
I'm honestly not sure. I know that you can use Shift+Click & Ctrl+Click to select and deselect multiple options in drop-down boxes (when multiple selection is enabled). I also know quite a bit about the ChronoForms code so just ran a quick test to make sure that it worked here.
Bob
This topic is locked and no more replies can be posted.