[PHP-DB] Creating a Table to line query results in php?

2007-02-25 Thread Scott

Hi everyone!

How can I create a table...or even something similar...to line information up?

The information is coming from an mysql database and there are 5
columns of data.

Of course I am using php to call the data out of the database.

A simple example:

while ($data = mysql_fetch_array($res))
{
$idfield = $data['IDFIELD'];
$name = $data['Name'];
$effect = $data['Effect'];
$category = $data['Category'];
$origin = $data['Origin'];
$image = $data['Image'];

echo ", $name, $effect, $category, $origin";
}

The echo is the stuff I want to line up under the headings of the
columns when they are displayed.

So there are 5 headers and under the 5 headers is the resulting
display of info and I want it lined up, centered, under the headers.

Does that all make sense?

Thanks for all of your time!

S

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] A good PHP Ajax tutorial

2007-02-25 Thread bob plano

well i found a site that has a lot of web building tutorials on it. i
havent looked much at them though. the site is
http://www.w3schools.com/default.asp

On 2/24/07, Denis L. Menezes <[EMAIL PROTECTED]> wrote:

Dear friends.

Can someone please suggest a good pHP/Ajax tutorial?

Thanks
Denis

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Creating a Table to line query results in php?

2007-02-25 Thread Chris

Scott wrote:

Hi everyone!

How can I create a table...or even something similar...to line 
information up?


Use a table? http://www.w3schools.com/html/html_tables.asp

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Creating a Table to line query results in php?

2007-02-25 Thread Scott

ThanksI was trying to do that but was not working for me. I think
I was over thinking it.

The obvious is never obvious :)

On 2/25/07, Matt Anderton <[EMAIL PROTECTED]> wrote:

why not just create a table?

echo "\n";
echo
"ImageNameEffectCategoryOrigin\n";
while ($data = mysql_fetch_array($res))
{
  echo "\n";
  echo "" . $data['Image'] . "\n";
  echo "" . $data['Name'] . "\n";
  echo "" . $data['Effect'] . "\n";
  echo "" . $data['Category'] . "\n";
  echo "" . $data['Origin'] . "\n";
  echo "\n";
}
echo "\n";


Or am I oversimplifying?

~ matt




On 2/25/07, Scott <[EMAIL PROTECTED]> wrote:
>
> Hi everyone!
>
> How can I create a table...or even something similar...to line information
up?
>
> The information is coming from an mysql database and there are 5
> columns of data.
>
> Of course I am using php to call the data out of the database.
>
> A simple example:
>
> while ($data = mysql_fetch_array($res))
> {
> $idfield = $data['IDFIELD'];
> $name = $data['Name'];
> $effect = $data['Effect'];
> $category = $data['Category'];
> $origin = $data['Origin'];
> $image = $data['Image'];
>
> echo ", $name, $effect, $category, $origin";
> }
>
> The echo is the stuff I want to line up under the headings of the
> columns when they are displayed.
>
> So there are 5 headers and under the 5 headers is the resulting
> display of info and I want it lined up, centered, under the headers.
>
> Does that all make sense?
>
> Thanks for all of your time!
>
> S
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>





--
Scott Burcky
AOL IM: Jestrix1

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Creating a Table to line query results in php?

2007-02-25 Thread Chris

Scott wrote:

ThanksI was trying to do that but was not working for me. I think
I was over thinking it.

The obvious is never obvious :)

On 2/25/07, Matt Anderton <[EMAIL PROTECTED]> wrote:

why not just create a table?

echo "\n";
echo
"ImageNameEffectCategoryOrigin\n"; 


while ($data = mysql_fetch_array($res))
{
  echo "\n";
  echo "" . $data['Image'] . "\n";
  echo "" . $data['Name'] . "\n";
  echo "" . $data['Effect'] . "\n";
  echo "" . $data['Category'] . "\n";
  echo "" . $data['Origin'] . "\n";
  echo "\n";
}
echo "\n";


The middle ones should be 's:

echo "\n";
echo "" . $data['Image'] . "\n";
echo "" . $data['Name'] . "\n";
echo "" . $data['Effect'] . "\n";
echo "" . $data['Category'] . "\n";
echo "" . $data['Origin'] . "\n";
echo "\n";

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] A good PHP Ajax tutorial

2007-02-25 Thread Peter Beckman

On Sun, 25 Feb 2007, Denis L. Menezes wrote:


Can someone please suggest a good pHP/Ajax tutorial?


 Use mootools, http://mootools.net/

 Best JS library around, does all sorts of neat AJAXy animations as well as
 handling the backend cross-browser.

---
Peter Beckman  Internet Guy
[EMAIL PROTECTED] http://www.purplecow.com/
---

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php