[Database class] database question (on aligning display)

Paul S. Wang pwang at cs.kent.edu
Fri Mar 2 11:23:48 EST 2012


You need to compute the exact width for each column in your result set
then you can align the columns correctly.

The metadata part of the result set contains such info.
See PHP documentation for mysqli_result class for info.

Paul
On Thu, Mar 01, 2012 at 05:47:56PM -0500, Thamer Alrefai wrote:
> Date: Thu, 1 Mar 2012 17:47:56 -0500
> From: Thamer Alrefai <talrefai at kent.edu>
> To: pwang at cs.kent.edu
> Subject: database question
> 
> Hi Prof.
> 
> How can I do alignment for a table in php, so when I print a table make it
> clear to read?
> 
> 
> Thank You
> Thamer Alrefai

-- 
==============================================================================
 Paul S. Wang (王士弘)                      Email: pwang at cs.kent.edu            
 Dept. of Computer Science, Kent State U.   Tel: (330) 672-9051
 Kent, Ohio, USA 44242-0001                 http://www.cs.kent.edu/~pwang/ 
==============================================================================


More information about the Dbclass mailing list