SELECT `m`.`V0`, `m`.`V1`, `mt`.`V0`, `mt`.`V1`, ...
FROM `members` AS `m`
LEFT JOIN `members_two` AS `mt` ON `mt`.`Owned` = `m`.`member_id`
WHERE `m`.`member_id` = :uid
LIMIT 1
<div class="form-item">
<a href="http://site.local/events?field_years_tid=8"><</a>
<a href="http://site.local/events?field_years_tid=9" class="active">2014</a>
<a href="http://site.local/events?field_years_tid=10">2015</a>
<a href="http://site.local/events?field_years_tid=11">2017</a>
<a href="http://site.local/events?field_years_tid=10">></a>
</div>
myQuery->SQL->Text = (AnsiString)"SELECT f_department.CODE, f_department.NAME FROM f_department LEFT JOIN l_modules_22_department ON l_modules_22_department.CODE_2 = f_department.CODE WHERE l_modules_22_department.CODE_1 = '"
+ depBlock[i].moduleCode + (AnsiString)"'";
SELECT `id`, `date`, `name`
FROM `table`
ORDER by `date`, `id`
LIMIT 10
SELECT `id`, `name`, `date`
FROM `table`
WHERE (@Date := (SELECT `date` FROM `table` WHERE `id` = :last_id))
AND (`date` > @Date OR (`date` = @Date AND `id` > :last_id))
ORDER BY `date`, `id`
LIMIT 10