PDA

View Full Version : Adding a prefix to results & resizing table view


Kayla
06-28-2005, 05:39 PM
I just recently had to make another page for users to view data in a different style.

First I needed to preceed any entry in a particular field with a $ sign so it would show as $59.95 for example. So I opened the *_view.php file in wordpad:

* My Changes:
// Query used in table view
$x->Query = "select CONCAT('$', testable.number) as 'Number' from testable";

-------------------------------------------------------------
Next I had to center the table and resize it into an existing php file.

I opened the datalist.php file in wordpad and found these lines.
$t = time(); // just a random number for any purpose ...

$this->HTML .= "<table cellspacing=1 cellpadding=0 border=0><tr>\n";

// display table title and Print and Filter icons

* My Changes:
$this->HTML .= "<table cellspacing=1 cellpadding=0 border=0 align=center width=730><tr>\n";
// display table title and Print and Filter icons

Hope this helps someone

dwade
06-30-2005, 03:35 PM
Nice tip Kayla, Thanks! :)

50butNIFTY
01-10-2010, 09:04 PM
Thank you so much!

This is exactly what I was looking for!