how works db read

itacolomy 03 Mar, 2014
Hi for all

Please someone could help me?

how works db read?
I need alter or delete an register included through of DB SAVE.
How do this?

Thanks!
itacolomy 04 Mar, 2014
Hi Klode,

Good morning!

I'm sorry, but don't understand nothing.

This reply is for me?
GreyHead 05 Mar, 2014
HI itacolomy,

The DB Read action is to load data from a database table into a form. If you need to edit or delete data that has to be done with DB Save or with a custom MySQL query.

Bob

PS I think Klode's post was just spam - I've deleted it.
itacolomy 05 Mar, 2014
Ok GreyHead, but I'm using this functions and don't loading data.

See image sent.

I mistake something?

You are any examplo 'working' for me?

Thanks!
GreyHead 05 Mar, 2014
Hi itacolomy,

I have no idea what you are trying to do?

How do you know which record(s) you need to read? How are they identified?

What settings do you have in the DB Read action now?

What do you need to do with the data you read?

Bob
itacolomy 06 Mar, 2014
Hi Bob,

Good morning!

I need that recorded of table `zv9ic_chronoengine_chronoforms_datatable_ClassifCompras` appear on the form, then I can make the change.

Below, settings of the form:

Edit action settings from DB Read

Enable = YES

Table name = `zv9ic_chronoengine_chronoforms_datatable_ClassifCompras`

Multi read = NO

Enable Model ID = YES

Model ID = DATA

Fields =

Order =

Conditions =
GreyHead 08 Mar, 2014
Hi itacolomy,

To load that record you'd need to add an entry to the Conditions box something like this:
<?php
$where = array(
  'registro' => '2'
);
return $where;
?>


Bob
itacolomy 09 Mar, 2014
Hi Bob,

Good evening!

I did the change on conditions box, but the form continuos appear blank

I need show the record in form, see example in image.


Below, settings of the form:

Edit action settings from DB Read

Enable = YES

Table name = `zv9ic_chronoengine_chronoforms_datatable_ClassifCompras`

Multi read = NO

Enable Model ID = YES

Model ID = DATA

Fields =

Order =

Conditions = <?php $where = array( 'registro' => '2');return $where;?>

Thanks!
GreyHead 09 Mar, 2014
Hi itacolomy,

Please try 'REGISTRO' instead of 'registro'. I typed that wrongly :-(

Bob
itacolomy 09 Mar, 2014
If I use REGISTRO, the joomla appear this error bellow:

----------------------------------------------------------------------------------------------------------------------------------------------------------
You may not be able to visit this page because of:

an out-of-date bookmark/favourite
a search engine that has an out-of-date listing for this site
a mistyped address
you have no access to this page
The requested resource was not found.
An error has occurred while processing your request.
Please try one of the following pages:

Home Page
If difficulties persist, please contact the System Administrator of this site and report
the error below..

Oops... SQL=SELECT `Data`.`id` AS `Data.id`, `Data`.`uniq_id` AS `Data.uniq_id`,
`Data`.`user_id` AS `Data.user_id`, `Data`.`created` AS `Data.created`,
`Data`.`modified` AS `Data.modified`, `Data`.`Nome` AS `Data.Nome`,
`Data`.`Telefone` AS `Data.Telefone`, `Data`.`Email` AS `Data.Email`,
`Data`.`Descricao` AS `Data.Descricao`, `Data`.`Valor` AS `Data.Valor`,
`Data`.`captcha` AS `Data.captcha`, `Data`.`Enviar` AS `Data.Enviar`
FROM `zv9ic_chronoengine_chronoforms_datatable_ClassifCompras` AS `Data`
WHERE `Data`.`REGISTRO` = '2'
--------------------------------------------------------------------------------------------------------------------------------------------------
But if I use just 'id' then the form appear blank and if use 'Data.id' also appear blank.
GreyHead 09 Mar, 2014
Hi itacolomy,

You need to put the correct column name in there - I was looking at the first image you posted but it seems as if the headers there aren't column names.

Bob
sillybaba 27 May, 2014
I have the same problem,I selected the database table and entry to conditions box <?php return array('id' => '3'); ?> in "DB read" tab,but ,the page appear blank.
Max_admin 27 May, 2014
Hi Sillybaba,

What's the name of the primary key in this table ? and does it have the value "3" ?

Regards,
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.