Forums

Edit An Existing Record?

RobEnd 18 Oct, 2008
Hello,
First off thanks for this component, it looks very promising and fills a gap in Joomla components. I'm a newb and find it hard to believe how few components there are for managing data. I was hoping to find something like MS Access with a "publish to website" button. But then I'm idealistic..

I followed the tutorial and made the admin edit record template. It displays my data fine but when I click on a field name I get an empty edit page. If I type data in I can save it and add a new record. Deleting is easy too.

What I cannot work out is how to edit an existing record. What I would like to see is a button at the top "Add New Record" for adding records, and clicking on an existing record opens it for editing. The link shown when I hover on a record reads.../index2.php#edit_data - surely it should be something like index2.php#edit_data&ID=2

btw - I doubt if it matters, I use the JCE editor.

Cheers,
Rob

<?php
$editor    =& JFactory::getEditor();
?>
<table>
    <tr>
        <td>title:</td><td><input type="text" name="title" size="100" value=""></td>
    </tr>
    <tr>
        <td>ID:</td><td><?php echo $editor->display( 'ID',  '' , '100%', '350', '75', '20', false ) ; ?></td>
    </tr>
    <tr>
        <td>catno:</td><td><?php echo $editor->display( 'catno',  '' , '100%', '350', '75', '20', false ) ; ?></td>
    </tr>
    <tr>
        <td>price:</td><td><input type="text" name="price" value=""></td>
    </tr>
    <tr>
        <td>published:</td><td>
        <select name="published">
        <option value="0">No</option>
        <option value="1">Yes</option>
        </select>
        </td>
    </tr>
    <tr>
        <td>ID:</td><td>
     auto-increment
        </td>
    </tr>
</table>
<input type="hidden" name="ID" value="">
Max_admin 18 Oct, 2008
Hi Rob,

When you add on the link of some record, a new page open,s what can you see there ?

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
RobEnd 20 Oct, 2008
Hello Max,
if I click on ID, title or catno I just get a blank page, all the fields are listed but they are empty.. What confuses me is I cannot see where the data is passed onto the edit page. I was expecting to have to do something like this:

<input type="text" name="title" size="100" value="title"></td>


I'm happy to pm you my log in details if you have time to take a look yourself.

Thanks again,
Rob
Max_admin 20 Oct, 2008
Show me a screenshot for your DB table structure with fields names...etc

does your table has a primary key ?

Cheers,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
RobEnd 21 Oct, 2008
Here you go Max,
Another issue I have is I cannot find a database manager for Joomla 1.5 that works for me. Am I better off just using phpmyadmin externally?
cheers,
Rob

CREATE TABLE `merchandise` (
  `catno` varchar(24) default NULL,`title` varchar(50) default NULL, `format` varchar(11) default NULL, `ID` int(11) NOT NULL auto_increment,`browse_image` varchar(50) default NULL, `description` blob, `supplier_cost` varchar(15) default NULL,  `price` varchar(15) default NULL, `details` blob,  `print_details` blob,`background_image` varchar(100) default NULL, `background_position` varchar(40) default NULL,  `image01` varchar(50) default NULL, `image02` varchar(50) default NULL,`image03` varchar(50) default NULL,`background_positiondetails` varchar(50) default NULL,`size` varchar(20) default NULL,  PRIMARY KEY  (`ID`)) TYPE=MyISAM;
Max_admin 21 Oct, 2008
I see no problems, which browser do you use ? can you make another connection to jos_banners and add some edit code too and see if it load the banners table records, or any joomla table with records you may have.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 21 Oct, 2008
Hi Rob,

EasySQL works well in Joomla 1.5 and the latest version is 1.5 native.

Bob
RobEnd 21 Oct, 2008
Hi Again,
I tried the same thing with jos_banners and got exactly the same result. I have now noticed I cannot delete records either. If I click the delete button I get a warning alert box, press ok but nothing changes.
cheers,
Rob
Max_admin 21 Oct, 2008
Hi Rob,

A new Connectivity version will be out in the next hours hopefully and you can try with it but I see no problems at your code, I think your MYSQL version is old too, maybe you should consider an upgrade ? but hold on until you try the new release, its much more stable with many more features!

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.