Forums

$MyRow is empty?

Brisferr 27 Apr, 2012
Hello,

I did have copy some code from an other website I do manage (with joomla V1.5.1 and cc V3.1 RC5.5 and cc V2.0 RC3) on a new fresh install of joomla V2.5 with cf V4.0 RC3.3 and cc V4.0 RC2). For info, the two website are not hosted on the same place.

On the old version, everything is working fine.
On the new version, $MyRow send only empty value to the php variable. But if I'm using {form-field} I do get an correct answer.

Here is the code. I did verify that the field name are the same as the name of the column of the database.
<?php
$Prenom = $MyRow->Prenom;
$Nom = $MyRow->Nom;
echo '<font size=1px><b><p><font size=5px>',strtoupper($Prenom),' ',strtoupper($Nom),'</font></p>';
$photo = $MyRow->photo;
$sexe = $MyRow->sexe;
$httt = "<p>{rokbox title=|{Prenom} {Nom}| thumb=|/thumb_{photo}|}/onsize_{photo}{/rokbox}</p>";
if (empty($photo))
 { echo '';}
else
 { echo $httt;} 
if ($sexe == 'Femelle' or $sexe == 'Female')
 { $pronom = 'Elle';}
else
 { $pronom = 'Il';}
?>


As you can see, nothing very complicated...

When I'm testing by ex. empty($MyRow->Prenom), I receive True.

Do you have an idea to help me?

Brisferr
Max_admin 27 Apr, 2012
Hi Brisferr,

Please use this variable for "now":

$x_data


starting from the next version, you should use $row, and you should update your code when you upgrade.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Brisferr 02 May, 2012
Hi,

Thanks for your answer. I did not find somebody asking for this probleme on the forum.

But this is the solution and it work!!!!

Thanks.

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