Re: [PHP] Fwd: Quarter question..

2002-11-03 Thread Jim Hatridge
Hi JS et al... Thanks! This was what I was looking for. Also thanks for the color code, much smaller! JIM On Saturday 02 November 2002 18:54, Jonathan Sharp wrote: > try this: > > -js > > > $i = 0; > while ( $myrow = mysql_fetch_array($result) ) > { > $c = ( ++$i % 2 ? 'yellow' : 'white

Re: [PHP] Fwd: Quarter question..

2002-11-02 Thread John Nichel
When you run mysql_query, it just sends back a resource id to the result set. To get the data, use something like mysql_fetch_array() $sql = "SELECT * FROM `myDataBase.myTable`"; if ( $result = @mysql_query ( $sql ) ) { while ( $data = @mysql_fetch_array ( $result, MYSQL_ASSOC ) ) { print_r (

Re: [PHP] Fwd: Quarter question..

2002-11-02 Thread Jonathan Sharp
try this: -js "; printf('Delete', $PHP_SELF, $myrow['id'] ); $q = ceil( 4/(int)date('n', strtotime($mydata['date']) )); printf('%s%s%s', 'update-inv.php', $myrow['id'], $myrow['name'], $myrow['details'], $q); } ?> Jim Hatridge wrote: > HI all, > > In the code below I'm trying to