Re: [PHP] Need help to create HTML table with 2 columns.

2001-08-23 Thread Jeff Lewis

John,

Try this:

TABLE
?php
$query = SELECT image_link, web_url FROM testdata;
$result = mysql_query ($query) or die (Query Failed);
while ($row = mysql_fetch_object ($result))
 {
 printf (trTD.$row-image_links.br.$row-web_url./TD
TD.$row-image_link.br.$row-web_url./tr\n);
 }
 ?
 /TABLE

- Original Message -
From: John Bass [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 23, 2001 10:30 AM
Subject: [PHP] Need help to create HTML table with 2 columns.


 Hi All,

 I am trying to generate a table with two columns.  Each column should
print
 2 fields named image_link and web_url.  Have spent over week looking
 documentations and trying different coding but nothing is working.  Any
help
 will be greatly appreciated.

 TABLE
 ?php
 $query = SELECT image_link, web_url FROM testdata;
 $result = mysql_query ($query) or die (Query Failed);
 while ($row = mysql_fetch_object ($result))
 {
 printf (trTD%sbr%s/TD TD%sbr%s/tr\n, $row-image_link,
 $row-web_url,$row-image_link, $row-web_url);
 }
 ?
 /TABLE

 Regards,

 John Bass

 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Need help to create HTML table with 2 columns.

2001-08-23 Thread Markus Bertheau

ho,

John Bass wrote:
 printf (trTD%sbr%s/TD TD%sbr%s/tr\n, $row-image_link,
 ^^

You forgot to close the td tag, maybe your browser didnt display the table 
because of that.

Markus Bertheau


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Need help to create HTML table with 2 columns.

2001-08-23 Thread John Bass

Hi,

Thank you for the email.  I tried your code, but first column is printing 
image_link  web_url fields correctly and second column is repeating values 
of the first column.

Other records or rows are printing same way.

Regards,

John Bass

From: Jeff Lewis [EMAIL PROTECTED]
Reply-To: Jeff Lewis [EMAIL PROTECTED]
To: John Bass [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: [PHP] Need help to create HTML table with 2 columns.
Date: Thu, 23 Aug 2001 10:41:08 -0400

John,

Try this:

TABLE
?php
$query = SELECT image_link, web_url FROM testdata;
$result = mysql_query ($query) or die (Query Failed);
while ($row = mysql_fetch_object ($result))
  {
  printf (trTD.$row-image_links.br.$row-web_url./TD
TD.$row-image_link.br.$row-web_url./tr\n);
  }
  ?
  /TABLE

- Original Message -
From: John Bass [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 23, 2001 10:30 AM
Subject: [PHP] Need help to create HTML table with 2 columns.


  Hi All,
 
  I am trying to generate a table with two columns.  Each column should
print
  2 fields named image_link and web_url.  Have spent over week looking
  documentations and trying different coding but nothing is working.  Any
help
  will be greatly appreciated.
 
  TABLE
  ?php
  $query = SELECT image_link, web_url FROM testdata;
  $result = mysql_query ($query) or die (Query Failed);
  while ($row = mysql_fetch_object ($result))
  {
  printf (trTD%sbr%s/TD TD%sbr%s/tr\n, $row-image_link,
  $row-web_url,$row-image_link, $row-web_url);
  }
  ?
  /TABLE
 
  Regards,
 
  John Bass
 
  _
  Get your FREE download of MSN Explorer at 
http://explorer.msn.com/intl.asp
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Need help to create HTML table with 2 columns.

2001-08-23 Thread Jeff Lewis

What did you want in the second column?  I was just going by what you had
listed below:  $row-image_link,
   $row-web_url,$row-image_link, $row-web_url);


Jeff
- Original Message -
From: John Bass [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 23, 2001 11:16 AM
Subject: Re: [PHP] Need help to create HTML table with 2 columns.


 Hi,

 Thank you for the email.  I tried your code, but first column is printing
 image_link  web_url fields correctly and second column is repeating
values
 of the first column.

 Other records or rows are printing same way.

 Regards,

 John Bass

 From: Jeff Lewis [EMAIL PROTECTED]
 Reply-To: Jeff Lewis [EMAIL PROTECTED]
 To: John Bass [EMAIL PROTECTED], [EMAIL PROTECTED]
 Subject: Re: [PHP] Need help to create HTML table with 2 columns.
 Date: Thu, 23 Aug 2001 10:41:08 -0400
 
 John,
 
 Try this:
 
 TABLE
 ?php
 $query = SELECT image_link, web_url FROM testdata;
 $result = mysql_query ($query) or die (Query Failed);
 while ($row = mysql_fetch_object ($result))
   {
   printf (trTD.$row-image_links.br.$row-web_url./TD
 TD.$row-image_link.br.$row-web_url./tr\n);
   }
   ?
   /TABLE
 
 - Original Message -
 From: John Bass [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, August 23, 2001 10:30 AM
 Subject: [PHP] Need help to create HTML table with 2 columns.
 
 
   Hi All,
  
   I am trying to generate a table with two columns.  Each column should
 print
   2 fields named image_link and web_url.  Have spent over week looking
   documentations and trying different coding but nothing is working.
Any
 help
   will be greatly appreciated.
  
   TABLE
   ?php
   $query = SELECT image_link, web_url FROM testdata;
   $result = mysql_query ($query) or die (Query Failed);
   while ($row = mysql_fetch_object ($result))
   {
   printf (trTD%sbr%s/TD TD%sbr%s/tr\n, $row-image_link,
   $row-web_url,$row-image_link, $row-web_url);
   }
   ?
   /TABLE
  
   Regards,
  
   John Bass
  
   _
   Get your FREE download of MSN Explorer at
 http://explorer.msn.com/intl.asp
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
[EMAIL PROTECTED]
  
  
  
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Need help to create HTML table with 2 columns.

2001-08-23 Thread John Bass

second column should print next record that was returned from the query.

Thanks.

John

From: Jeff Lewis [EMAIL PROTECTED]
Reply-To: Jeff Lewis [EMAIL PROTECTED]
To: John Bass [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: [PHP] Need help to create HTML table with 2 columns.
Date: Thu, 23 Aug 2001 11:29:36 -0400

What did you want in the second column?  I was just going by what you had
listed below:  $row-image_link,
$row-web_url,$row-image_link, $row-web_url);


Jeff
- Original Message -
From: John Bass [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 23, 2001 11:16 AM
Subject: Re: [PHP] Need help to create HTML table with 2 columns.


  Hi,
 
  Thank you for the email.  I tried your code, but first column is 
printing
  image_link  web_url fields correctly and second column is repeating
values
  of the first column.
 
  Other records or rows are printing same way.
 
  Regards,
 
  John Bass
 
  From: Jeff Lewis [EMAIL PROTECTED]
  Reply-To: Jeff Lewis [EMAIL PROTECTED]
  To: John Bass [EMAIL PROTECTED], [EMAIL PROTECTED]
  Subject: Re: [PHP] Need help to create HTML table with 2 columns.
  Date: Thu, 23 Aug 2001 10:41:08 -0400
  
  John,
  
  Try this:
  
  TABLE
  ?php
  $query = SELECT image_link, web_url FROM testdata;
  $result = mysql_query ($query) or die (Query Failed);
  while ($row = mysql_fetch_object ($result))
{
printf (trTD.$row-image_links.br.$row-web_url./TD
  TD.$row-image_link.br.$row-web_url./tr\n);
}
?
/TABLE
  
  - Original Message -
  From: John Bass [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, August 23, 2001 10:30 AM
  Subject: [PHP] Need help to create HTML table with 2 columns.
  
  
Hi All,
   
I am trying to generate a table with two columns.  Each column 
should
  print
2 fields named image_link and web_url.  Have spent over week looking
documentations and trying different coding but nothing is working.
Any
  help
will be greatly appreciated.
   
TABLE
?php
$query = SELECT image_link, web_url FROM testdata;
$result = mysql_query ($query) or die (Query Failed);
while ($row = mysql_fetch_object ($result))
{
printf (trTD%sbr%s/TD TD%sbr%s/tr\n, 
$row-image_link,
$row-web_url,$row-image_link, $row-web_url);
}
?
/TABLE
   
Regards,
   
John Bass
   
_
Get your FREE download of MSN Explorer at
  http://explorer.msn.com/intl.asp
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail:
[EMAIL PROTECTED]
   
   
   
  
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: 
[EMAIL PROTECTED]
  
 
 
  _
  Get your FREE download of MSN Explorer at 
http://explorer.msn.com/intl.asp
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 



_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Need help to create HTML table with 2 columns.

2001-08-23 Thread Dave Freeman

On 23 Aug 01, at 14:30, John Bass wrote:

 TABLE
 ?php
 $query = SELECT image_link, web_url FROM testdata;
 $result = mysql_query ($query) or die (Query Failed);
 while ($row = mysql_fetch_object ($result))
 {
 printf (trTD%sbr%s/TD TD%sbr%s/tr\n, $row-image_link, 
 $row-web_url,$row-image_link, $row-web_url);
 }
 ?
 /TABLE

Your 'while ($row...) is reading in one row of data.  You're then outputing 
that one row of data twice.  Is that what you wanted?

You don't specifically say what it is that isn't working in this code so I'm 
really just guessing.  If you're actually after a different set of data in each 
row then you're going to need to approach it differently.

To have new data in the second column you'll basically have to add a flag 
to track if you've already put data on that row and then change the tags 
accordingly (if you've already got the start of the row, add the new column 
and end the row, otherwise start a row and add your data).

CYA, Dave


---
Outback Queensland Internet - Longreach, Outback Queensland - Australia
http://www.outbackqld.net.au  mailto:[EMAIL PROTECTED]
---

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]