Forums

Edit and delete ability

samoht 03 Nov, 2008
hello,


I started working with ChronoConnect - and got as far as having the table display plus I added this in the editor so that I could edit the names of each referral:


    <?php
    $editor    =& JFactory::getEditor();
    ?>

    <table>

        <tr>

            <td>Name:</td><td><input type="text" name="display_option" size="100" value=""></td>

        </tr>



    </table>

    <input type="hidden" name="id" value="">




However, this only allows me to add new entries. What do I need to do to be able to edit entries already made and delete unwanted entries??

thanks 😀
Max_admin 03 Nov, 2008
Hi, do you have a primary key field at this table you are connecting to ?

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
samoht 03 Nov, 2008
yes,

list_id is the name of my primary key
samoht 03 Nov, 2008
here is my table structure:

--
-- Table structure for table `jos_vm_heard_about_us_list`
--

CREATE TABLE IF NOT EXISTS `jos_vm_heard_about_us_list` (
  `list_id` int(11) NOT NULL auto_increment,
  `display_option` varchar(50) default NULL,
  PRIMARY KEY  (`list_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='heard about us list' AUTO_INCREMENT=14 ;
samoht 04 Nov, 2008
Quick question about format and parse problem.


I have this in my query:

SELECT FROM_UNIXTIME( cdate, '%Y-%m-%d' ) AS dater
FROM `jos_vm_orders`


Chronoforms or joomla doesn't like the '%' - but that is the proper sql - so what should I do??
GreyHead 04 Nov, 2008
Hi samoht,

That syntax works OK for me. If the error message is showing up around the %Y then the problem may be the quotes. Sometimes MySQL is very fussy about the type of quote. Try using back-ticks` ` or double quotes instead of single quotes.

Bob
samoht 04 Nov, 2008
Thanks BOB!

yes, double quotes worked - single quotes were a no go.
Anyway, any thoughts on the edit / delete capabilities??
Do I need to purchase the licensed version of chronoconnectivity to do this?
GreyHead 04 Nov, 2008
Hi samoht,

Glad that worked :-)

I'm not sure about licensing, Max knows all about that. I think that any version of ChronoConnectivity will let you edit tables in the backend. Click on View Data and you can do it all.
samoht 04 Nov, 2008
That is what it seems like, but if I try to delete an entry - nothing happens. If I try to edit an entry I don't edit the entry but add an entirely new entry?
Max_admin 04 Nov, 2008
Hi samoht,

to edit an entry you need to have this in your html:

<input type="hidden" name="list_id" value="">


I'm not sure why you can't delete though, wait for the coming release in the next 2 or 3 days.

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
samoht 04 Nov, 2008
Hi Max,

I did have that in my "Record Edit Template: " in the Admin Config - is that what you mean by in the HTML?
or do I need this in another spot too??
Max_admin 04 Nov, 2008
yes I mean in the record edit template, at the code above you have only name="id" not name="list_id"

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
samoht 04 Nov, 2008
oh, your right... I changed that when I noticed the inconsistency - but still no dice
Max_admin 04 Nov, 2008
I have no idea why it doesnt edit then, wait for the coming release and retest, I have fixed somethings but it was editing fine before any fixes.

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.