$query->select('t.*, a.box_id, a.box_date_connection, a.box_date_storage, a.box_obs, a.box_version, a.box_version_date, a.box_placa_mennekes, a.box_keyboard_version, a.box_downgrade_CPU, a.box_IP'); $query->from('#__carregadores_kiosks AS t'); $query->join('LEFT', '#__carregadores_boxs AS a USING(box_id)'); $query->where("t.kiosk_id = '{$kiosk_id}'"); $db->setQuery($query); $row = $db->loadObject();
What are the changes that I must do for that can display the values of three different table? My three differents tables are: #__carregadores_kiosks #__carregadores_boxs #__carregadores_pens I try do the following change but without any positive results
$query->join('LEFT', '#__carregadores_boxs AND #__carregadores_pens AS a USING(box_id, pen_id)');
> What are the changes that I must do for that can display the values of three different table?
> My three differents tables are: #__carregadores_kiosks
> #__carregadores_boxs
> #__carregadores_pens
> I try do the following change but without any positive results
> $query->join('LEFT', '#__carregadores_boxs AND #__carregadores_pens AS a USING(box_id, pen_id)');
> Any one know what I must do?
> -- > You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
> To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/A7DeGxjeeWIJ.
> To post to this group, send an email to joomla-dev-general@googlegroups.com.
> To unsubscribe from this group, send email to joomla-dev-general+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
> What are the changes that I must do for that can display the values of
> three different table?
> My three differents tables are: #__carregadores_kiosks
> #__carregadores_boxs
> #__carregadores_pens
> I try do the following change but without any positive results
> $query->join('LEFT', '#__carregadores_boxs AND #__carregadores_pens AS a
> USING(box_id, pen_id)');
> Any one know what I must do?
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! General Development" group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msg/joomla-dev-general/-/A7DeGxjeeWIJ.
> To post to this group, send an email to
> joomla-dev-general@googlegroups.com.
> To unsubscribe from this group, send email to
> joomla-dev-general+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/joomla-dev-general?hl=en-GB.
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! General Development" group.
> To post to this group, send an email to
> joomla-dev-general@googlegroups.com.
> To unsubscribe from this group, send email to
> joomla-dev-general+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/joomla-dev-general?hl=en-GB.
> What are the changes that I must do for that can display the values of three different table?
> My three differents tables are: #__carregadores_kiosks
> #__carregadores_boxs
> #__carregadores_pens
> I try do the following change but without any positive results
> $query->join('LEFT', '#__carregadores_boxs AND #__carregadores_pens AS a USING(box_id, pen_id)');
> Any one know what I must do?
> --
> You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
> > What are the changes that I must do for that can display the values of > three different table? > > My three differents tables are: #__carregadores_kiosks
> > #__carregadores_boxs > > #__carregadores_pens > > I try do the following change but without any positive results
> > $query->join('LEFT', '#__carregadores_boxs AND #__carregadores_pens AS a > USING(box_id, pen_id)');
> > Any one know what I must do?
> > --
> > You received this message because you are subscribed to the Google > Groups "Joomla! General Development" group.
>> > What are the changes that I must do for that can display the values of >> three different table? >> > My three differents tables are: #__carregadores_kiosks
>> > #__carregadores_boxs >> > #__carregadores_pens >> > I try do the following change but without any positive results
>> > $query->join('LEFT', '#__carregadores_boxs AND #__carregadores_pens AS >> a USING(box_id, pen_id)');
>> > Any one know what I must do?
>> > --
>> > You received this message because you are subscribed to the Google >> Groups "Joomla! General Development" group.
$query->select('t.*, a.box_id, a.box_date_connection, a.box_date_storage,
b.pen_id, b.pen_IMEI');
$query->join('LEFT', '#__carregadores_boxs AS a USING(box_id)');
$query->join('LEFT', '#__carregadores_pens AS b USING(pen_id)');
$query->from('#__carregadores_kiosks AS t');
$query->where("t.kiosk_id = '{$kiosk_id}'");
$db->setQuery($query);
$row = $db->loadObject();
return $row;
}
}
I can't see what I'm doing wrong.
If I put this code, the front end view don't load the values of the db.
If I delete the parameters "b.pen_id, b.pen_IMEI" and the
line $query->join('LEFT', '#__carregadores_pens AS b USING(pen_id)') the
front end show to me the parameters that are in the DB #__carregadores_boxs
and #__carregadores_kiosks.
>>> > What are the changes that I must do for that can display the values of
>>> three different table?
>>> > My three differents tables are: #__carregadores_kiosks
>>> > #__carregadores_boxs
>>> > #__carregadores_pens
>>> > I try do the following change but without any positive results
>>> > $query->join('LEFT', '#__carregadores_boxs AND #__carregadores_pens AS
>>> a USING(box_id, pen_id)');
>>> > Any one know what I must do?
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> Groups "Joomla! General Development" group.
> To post to this group, send an email to
> joomla-dev-general@googlegroups.com.
> To unsubscribe from this group, send email to
> joomla-dev-general+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/joomla-dev-general?hl=en-GB.
What does the generated query look like? Does it match the query you have that works if you run it directly icn your database? Did you try it the way it is in the do blocks?
> What are the changes that I must do for that can display the values of > three different table? > My three differents tables are: #__carregadores_kiosks > #__carregadores_boxs > #__carregadores_pens > I try do the following change but without any positive results
> $query->join('LEFT', '#__carregadores_boxs AND #__carregadores_pens AS a > USING(box_id, pen_id)');