Commit fc143e79 authored by Dries's avatar Dries

- Changed a MySQL-ism to be ANSI SQL/PostgreSQL compliant.  Patch by jaa.
parent 333e47ac
......@@ -276,12 +276,10 @@ function user_fields() {
static $fields;
if (!$fields) {
// is this ANSI? perhaps this should go in the database include...
$result = db_query("SHOW FIELDS FROM users");
while ($data = db_fetch_object($result)) {
$fields[] = $data->Field;
}
$result = db_query("SELECT * FROM users WHERE uid < 0");
$fields = array_keys(db_fetch_array($result));
}
return $fields;
}
......@@ -1965,8 +1963,6 @@ function julia_user($type, $edit, &$user) {
}
}
</pre>
<p>Extra credit: use the <a href="http://cvs.drupal.org/viewcvs.cgi/contributions/modules/hotlist/?cvsroot=contrib">hotlist.module</a> to provide Julia users a mechanism for bookmarking their favorite recipes.</p>
<?
}
?>
\ No newline at end of file
?>
......@@ -276,12 +276,10 @@ function user_fields() {
static $fields;
if (!$fields) {
// is this ANSI? perhaps this should go in the database include...
$result = db_query("SHOW FIELDS FROM users");
while ($data = db_fetch_object($result)) {
$fields[] = $data->Field;
}
$result = db_query("SELECT * FROM users WHERE uid < 0");
$fields = array_keys(db_fetch_array($result));
}
return $fields;
}
......@@ -1965,8 +1963,6 @@ function julia_user($type, $edit, &$user) {
}
}
</pre>
<p>Extra credit: use the <a href="http://cvs.drupal.org/viewcvs.cgi/contributions/modules/hotlist/?cvsroot=contrib">hotlist.module</a> to provide Julia users a mechanism for bookmarking their favorite recipes.</p>
<?
}
?>
\ No newline at end of file
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment