How to print all the elements of a specific column from a table from database in custom module? I have a  custom module. I would like to see all the blocks in it . For that i have written a query in my costom.module file . But it will show me the following error. 

Query:-

 $result = db_query('SELECT *FROM  `block` ORDER BY
`block`.`delta` ASC LIMIT 0 , 30');
 while ($node = db_fetch_object($result)) {
 print_r("$result");
 }


Why this is not working, Where am i going wrong ?
You made 4 errors:


You should use {} around table names, not ``.
print_r does not like objects Drupal uses, for testing purposes it's way better to use

while($row = $result->fetchAssoc() ){
}
$node may be already used elsewhere, it's not wise to use common names if you don't mean it.
SELECT *FROM should be SELECT * FROM (kudos for Clive)