leblancphil
Member
Hello
There is something I really dont understand.
I try to put some information in my form intro
I get a element value (default value from url opening the form
in exemple the admin3_compta___scol_id is 11004
I have the right result
11004
11004
but when I try after
I get the 1064 error
....WHERE admin3_scolarites.id = {admin3_compta___scol_id_raw}....
Why ?
Thanks
There is something I really dont understand.
I try to put some information in my form intro
I get a element value (default value from url opening the form
in exemple the admin3_compta___scol_id is 11004
Code:
{admin3_compta___scol_id_raw}<br />
<?php
$scol = '{admin3_compta___scol_id_raw}';
echo $scol;
11004
11004
but when I try after
Code:
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery
->select('r_a_p')
->from('admin3_scolarites')
->where('admin3_scolarites.id = '.$scol);
$myDb->setQuery($myQuery);
$rap = $myDb->loadResult();
return $rap;
....WHERE admin3_scolarites.id = {admin3_compta___scol_id_raw}....
Why ?
Thanks