Buy Now
Sign in

CFv6 - General problem

HerKle , January 12 at 23:17
HerKle

I am working with CFv5 and am more than satisfied. Now I used a train ride (without wifi) of eight hours to study CFv6 and its tutorial and exmperimenting a bit locally – but I didn't even manage to show data read out from a database! I am irritated: have I become complete ignorant or is the tutorial not tutoring? :-;

The tutorial says if I don't know how the variable looks like, put {var.pr:read_data1} into a custom field. The result shown in preview is: {var.pr:read_data1}.

I tried ordinary php and asked

				echo var_dump($this->data['read_data1']);
				
. What I got was: NULL.

But the debugger says there are data:
				Array
(
[read_data1] => Array
(
[log] => Array
(
[0] => SELECT `jubi`.`id` AS `jubi.id`, `jubi`.`name` AS `jubi.name`, `jubi`.`gdat` AS `jubi.gdat` FROM `gk16_filialfinder_stores` AS `jubi` WHERE `jubi`.`gdat` > '0';
)

[var] => Array
(
[0] => Array
(
[jubi] => Array
(
[id] => 1
[name] => Weggefährten
[gdat] => 08.10.1954
)


I need to process those data before I present the results in "Display Section". So I need to know eg. how to reach [gdat].

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

On page 21 you use "Content" as model name. A really bad choice of name. When I was searching for "php syntax" I was shown page 26 with some explanation containing "content" which I misunderstood as some necessary function – without knowing the preconditions of page 21. I suggest you use for customizing examples in tutorials sth. like "mymodelname".

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks for your assistance!

_______________________________
<STYLE> is poor man's basic right.

NickOg

I found conversion from CF5 to CF6 not easy but well worth while - in the end! :) To the degree that it is worth my while to rewrite some CF5 forms in CF6.

Have you tried

to see that the data is there as you expect? And Max passed this on as a means of retrieving data
				$mydata=$this->get('read_data1');
				


Stick with it. :twisted: :twisted:

Regards
Nick

HerKle

The last one did it! Thank you so much!

Could someone write it into the tutorial, too? Thx!

_______________________________
<STYLE> is poor man's basic right.