views:

9

answers:

1

Hi,

I have a problem with a custom query in drupal:

$brief = db_query("SELECT * FROMdr_wiwe_profile_valuesWHEREfid= 16 ANDuid= 266");

This query returns resource(286) of type (mysql result) resource(562) of type (mysql result) .

What is wrong with my query?

A: 

loop over the db resource object

$dbh = db_query("SELECT * FROM dr_wiwe_profile_values WHERE fid=16 AND uid=266");
$results = array();
while($row = db_fetch_array($dbh)){
  $results[] = $row;
}
brian_d