Patch By Lance Larsh <lance.larsh@oracle.com> r=mkanat, a=justdave
$dbh->sql_date_format('deadline', '%Y-%m-%d') . "
FROM bugs
LEFT JOIN votes
- USING (bug_id)
+ ON bugs.bug_id = votes.bug_id
INNER JOIN components
ON components.id = bugs.component_id
INNER JOIN products
"products.votesperuser, products.maxvotesperbug " .
"FROM profiles " .
"LEFT JOIN votes ON profiles.userid = votes.who " .
- "LEFT JOIN bugs USING(bug_id) " .
+ "LEFT JOIN bugs ON votes.bug_id = bugs.bug_id " .
"LEFT JOIN products ON products.id = bugs.product_id " .
"WHERE votes.bug_id = ? " . $whopart);
$sth->execute($id);
$sth = $dbh->prepare(
"SELECT longdescs.bug_id, thetext " .
"FROM longdescs " .
- "LEFT JOIN bugs using(bug_id) " .
+ "LEFT JOIN bugs ON longdescs.bug_id = bugs.bug_id " .
"WHERE (" . $dbh->sql_regexp("thetext",
"'[.*.]{3} This bug has been marked as a duplicate of [[:digit:]]+ [.*.]{3}'") . ") " .
"AND (resolution = 'DUPLICATE') " .