flynny
asked on
PHP Doctrine Query Help
I want to convert the following sql statment to a doctrine query can an yone help?
i have the following mysql statement returning the code i need
is returning no results?
i have the following mysql statement returning the code i need
SELECT p.user_id, p.main_photo, p.sex, v.visitor_id, v.date, u.username
FROM (
(
joomla_lovefactory_profiles p
LEFT JOIN joomla_lovefactory_profile_visitors v ON p.user_id = v.visitor_id
)
LEFT JOIN joomla_users u ON v.visitor_id = u.id
)
WHERE v.user_id =231
$query = $dbo->getQuery(true)
->select('p.user_id, p.main_photo, p.sex','v.visitor_id v.date', 'u.username')
->from('#__lovefactory_profiles p, #__lovefactory_profile_visitors v, #__users u')
->leftJoin('p.user_id ON v.visitor_id')
->leftJoin('v.visitor_id ON u.id')
->where('p.user_id = :user')
->setParameter('user', $user->id);
is returning no results?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.