Location: PHPKode > projects > top serious project > bco/gen_stylesheet.php
<?php

require('include.php');

$query = "select id, colors from users";

if (!$result = pg_query($query)) {
    bco_error(pg_last_error());
}

while ($row = pg_fetch_array($result)) {
    print "User $row[id]...";
    pg_query('BEGIN');
    $stylesheet = trim(bco_generate_stylesheet($row['colors']));
    pg_query("UPDATE users set stylesheet='$stylesheet' where id=$row[id]");
    pg_query('COMMIT');
    print " done.<br />";
}

?>
Return current item: top serious project