Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.2.2
-
Fix Version/s: None
-
Component/s: Query
-
Labels:None
-
Environment:ubuntu 64 bit, using a task in symfony
Description
The difference between the two code samples below is that there is a comma after 'lo.postal'_code in the second example:
This code DOES NOT RANDOMIZE But also DOES NOT PRODUCE A PARSER ERROR
$q = Doctrine_Query::create()
->select("li.id,
ap.name,
act.title, act.title_short, act.family_friendly,
o.unix_ts_begin, o.unix_ts_end,
act.description,
act.cost_min, act.tags, act.cost_min, act.cost_notes, act.organization,
lo.thoroughfare, lo.address_extra, lo.locality, lo.administrative_area, lo.country_name_code, lo.postal_code
RANDOM() AS rand")
->from(blah, blah)
->where(primary key equality statements for joining)
->orderBy('rand');
This DOES
$q = Doctrine_Query::create()
->select("li.id,
ap.name,
act.title, act.title_short, act.family_friendly,
o.unix_ts_begin, o.unix_ts_end,
act.description,
act.cost_min, act.tags, act.cost_min, act.cost_notes, act.organization,
lo.thoroughfare, lo.address_extra, lo.locality, lo.administrative_area, lo.country_name_code, lo.postal_code,
RANDOM() AS rand")
->from(blah, blah)
->where(primary key equality statements for joining)
->orderBy('rand');