Forums

how can I delete a table?

drb 27 Aug, 2007
Hello,
I have been graciously helped by several people from admin/dev(?).
I thank them wholeheartedly.

One of my forms didn't work - it didn't send emails. Then it got fixed. Then it had issues with exporting to excel, a name chnage of the form, fixed that.

Now I realize that it is not saving any records to the table. When I ask chrono to create a table, it says it already exists. There is few records in it and nothing gets added more.

any help?

thank you,
GreyHead 27 Aug, 2007
Hi drb,

Looks as though the AutoGenerate code has been deleted, please can you check in the Forms Manager AutoGenerate field.

If it's the form that you sent me then the code you need is probably this:
<?php
global $database;
$database->setQuery( "INSERT INTO #__chronoforms_3
    SET cf_id = '',
    recordtime = '". date('Y-m-d')." - ".date("H:i:«»s"«»)."',
    Name = '".$_POST['Name']."', 
    email = '".$_POST['email']."', 
    message = '".$_POST['message']."', 
    ipaddress = '".$_SERVER['REMOTE_ADDR']."';"«»);
if (!$database->query()) {
     showErrorMessage($database->getErrorMsg()); }
?>
NB - check the table name '#__chronoforms_3', yours will be some other number at the end. You can try pasting this into the AutoGenerate field.

If this isn't the correct code AND the data you have saved is just test data then you can drop the table using PHPMyAdmin and let ChronoForms create a new one. If you do want to keep the data then we can try another workaround.

Bob
drb 27 Aug, 2007
Thanks, you were right. somehow 'autogenerate' code was deleted. It was not there.

I pasted the above code and put #_chronoform_1
as my form ID was 1. and it worked.


Out of curiosity, I checked my webserver using phpmyadmin to see the database, I couldn't find the table. All I have is joomla table. Am I right? Sorry i am not familiar with these stuff. just trying to learn.


I think it would help, if chronoforms has a link to phpmyadmin table stuff from backend, or more control over records in table from backend.

drb<br><br>Post edited by: drb, at: 2007/08/27 00:35
GreyHead 27 Aug, 2007
Hi drb,

Glad to hear that everything is working again.

All I have is joomla table. A bit of jargon here, you have a Joomla 'database' and in that database are a series of tables. If you double click on the database you should see the table list, around 40 of them (maybe more if you have a lot of extensions installed). The table names will all start with the same prefix - the default is 'jos_', though this can be changed when you install Joomla.

The table you are looking for is probably 'jos_chronoform_1', if you double-click on this you will see options to browse, edit, drop, etc.

The '#_' prefix is used in Joomla code and replaced by Joomla with the appropriate prefix so '#__chronoform_1' becomes 'jos_chronoform_1'.

I think it would help, if chronoforms has a link to phpmyadmin table stuff This woudl be nice, but can't be done because if PHPMyAdmin exists and how it is accessed depends on the individual setup. As you've found most ISPs give you access to this or a similar tool.

more control over records in table from backend This seems to be coming bit by bit; Max has added more functionality with each release. Remember though that ChronoForms is a Form Manager and that users do very different things with the data they collect so it's unlikely ever to do all that you want.

Bob
This topic is locked and no more replies can be posted.