Comma after u.name is throwing errors.
/*
OLD, BUG:
$sql = "SELECT DISTINCT(u.uid), u.name, FROM {users} u INNER JOIN {node} n ON u.uid = n.uid WHERE n.status = 1 AND n.type = 'blog'";
FIX:
*/
$sql = "SELECT DISTINCT(u.uid), u.name FROM {users} u INNER JOIN {node} n ON u.uid = n.uid WHERE n.status = 1 AND n.type = 'blog'";

Comments

bob.hinrichs’s picture

Version: 5.x-2.9 » 5.x-2.11

oops, i set the wrong verions in previous post.

agentrickard’s picture

Status: Active » Closed (fixed)

Where did you get that code from?

If you check the current tarball, line 62 of blog.inc is actually:

  $sql = "SELECT DISTINCT(u.uid), u.name, u.picture FROM {users} u INNER JOIN {node} n ON u.uid = n.uid WHERE n.status = 1 AND n.type = 'blog' ORDER BY u.name";

So somehow you're missing the 'u.picture' piece after the comma.

bob.hinrichs’s picture

Thanks, I am downlaoding the module with the following CVS command, which hopefully grabs from the DURPAL 5 branch:
cvs -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal export -d mysite -r DRUPAL-5 contributions/modules/mysite

Is that the wrong branch?

Thank you.

agentrickard’s picture

Yes.

The active stable branch is 5--2. The active development branch is HEAD.

cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -r DRUPAL-5--2 contributions/modules/mysite

cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout contributions/modules/mysite

bob.hinrichs’s picture

Ok thanks, am using the 5--2 branch now.

agentrickard’s picture

Note that 5--2 in cvs is slightly different from 5.x.2.11. See the CHANGELOG for notes.