[PHP-DB] sending a form feed to a printer

2003-04-02 Thread Chevalier, Arthur
Hello,
 
I am having problems getting the \f (form feed) expression to work.  After a
certain amount of lines print I want to start printing the next line on a
new sheet of paper.  Any ideas of what I could be doing wrong.  Below is a
sample piece of my code.  The bold code is where I am trying to issue the
form feed.
 
while($row = mysql_fetch_array($dbResult))
{
print(TR\n);
print(TD class=\tdborder\A
HREF=\show_single_server.php?server_name=$row[0]\ TARGET=\text_float\
. $row[0] . /TD\n);
print(TD class=\tdborder\. $row[1] . /TD\n);
print(TD class=\tdborder\. $row[2] . /TD\n);
print(TD class=\tdborder\A
HREF=\$PHP_SELF?mid_tier=$row[3]db_rel=0\ TARGET=\text_float\.
$row[3] .  /TD\n);
print(TD class=\tdborder\A
HREF=\$PHP_SELF?db_rel=$row[4]mid_tier=0\ TARGET=\text_float\.
$row[4] .  /TD\n);
 
  $rowdata = $row[5];
  if($rowdata == )
  {
  print(TD class=\tdborder\nbsp;/TD\n);
  }
  else
  {
  print(TD class=\tdborder\. $row[5] .  /TD\n);
  }
  print(TD class=\tdborder\. $row[6] .  /TD\n);
  //print(/TR\n);
  
  if($counter == 20)
{
$counter = 0;
print(/TR\f);
continue;
}
else
{
$counter ++;
print(/TR);
continue;
}
  
}
 


RE: [PHP-DB] MySQL Array

2002-12-06 Thread Chevalier, Arthur
You are right about my query.  I am only pulling down one column. 

As you guys can probably tell I am pretty inexperienced with this.  I tried
what you said and still got the same results.

Here are snippets of my code and maybe this will depict what I am doing
wrong:

After creating the connection:

$query = select server_name from servers where midtier = '$server';
$dbResult = mysql_query($query,$dblink);  

$c = 1; 
print(tr);
while($row = mysql_fetch_array($dbResult))
{
print(td{$row['server_name']}/td);
if(($c % 4) == 0) 
{ 
print(/trtr); 
}
}



-Original Message-
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 05, 2002 3:26 PM
To: Ryan Jameson (USA); Art Chevalier; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL Array

I think he meant that he is only pulling one column, i.e. field1 with each
mysql_fetch_array and he wants that in four columns.

$c = 1;
echo tr;
while($ar = mysql_fetch_array($result))
{
  echo td{$ar['field1']}/td;
  if(($c % 4) == 0) { echo /trtr; }
}

You'll have to account for incomplete rows and clean up the output, but
hopefully that gives you an idea.

---John Holmes...

- Original Message -
From: Ryan Jameson (USA) [EMAIL PROTECTED]
To: Art Chevalier [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, December 05, 2002 3:05 PM
Subject: RE: [PHP-DB] MySQL Array


while ($ar = mysql_fetch_array($rs))
  echo trtd. $ar['field1']./tdtd.$ar['field2']./td/tr;


Make sense?

-Original Message-
From: Art Chevalier [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 12:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL Array


Hello,

I am pulling one column out of a MySQL table in an array.  I want to place
each element into a HTML table 4 rows across.  I am currently doing this
with the mysql_fetch_array() function. How can I pull out 4 array elements
in one pass through a while loop?

Thanks

Art Chevalier



--
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

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




[PHP-DB] sybase extensions

2001-10-04 Thread Chevalier, Arthur

Hello,

I am very new to PHP and am having problems finding out information
regarding loading up the Sybase extensions for IIS on Win2K. Any help would
be greatly appreciated.

Art Chevalier
Sybase Replication Administrator
Space and Naval Warfare Center, Chesapeake
1-757-523-8303

  

-- 
PHP Database 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]