Re: [PHP-DB] Please help!

2001-08-22 Thread Marios Moutzouris


use that counter variable. check if its equal to 2 before incrementing, if
it is then BR and reset to zero, otherwise just increment.

if ($counter==2) {
echo BR;
$counter=0;
} else {
$counter++;
}

marios
- Original Message - Original Message -
From: Matt C [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 22, 2001 9:37 PM
Subject: [PHP-DB] Please help!


 Thats my code!

 What I want to be able to do is have it so instead of one column there are
 two columns of pictures:


 pic1  | pic2
 pic3  | pic4

 etc..


 How can I do this?

 Thanks in advance!




 ?php

 $mysql_access = mysql_connect(, **, *);
 mysql_select_db(*, $mysql_access);

 $query = SELECT * FROM Pictures;
 $result = mysql_query($query, $mysql_access);

 if(mysql_num_rows($result)) {
   $counter = 0;
 while($row = mysql_fetch_row($result)) {

 printf(a href=\http://www.charmed-guide.com/pictures/$row[2].jpg\;
 target=_blank\n);
 printf(img src=\http://www.charmed-guide.com/pictures/$row[2]_th.jpg\;
 border=0\n);
 printf(/ap\n);

 $counter++;
 }

 }
 ?

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


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



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




[PHP-DB] Please help!

2001-08-22 Thread Marios Moutzouris

 try this :-)

 echo TABLE border=1 WIDTH=\80%\ ALIGN=CENTER;
 echo TR;
 $row= mysql_fetch_array($result);
 $count  = 0;
 do

  echo TD ALIGN=CENTERa href=\http://www.charmed-guide.com/pictures/ 
.
 $row[pic] .jpg\ target=_blank\n;
  echo img src=\http://www.charmed-guide.com/pictures/; .
 $row[thumbnail] . _th.jpg\border=0\n;
  echo /TD;
  $count++;
  if ($count==2) {
   echo /TR;
   echo TR;
   $count = 0;
  }
 } while ( ( $row = mysql_fetch_array($result) ) );
 echo /TR;
 echo /TABLE;

 - Original Message -
 From: Matt C [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, August 22, 2001 10:09 PM
 Subject: Re: [PHP-DB] Please help!


  Can you put it into my code and paste it as a whole? I don't know where
to
  put it :(
 
  _
  Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp
 



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




[PHP-DB] informix client sdk for linux

2001-03-14 Thread Marios Moutzouris

Hello

Anybody know where i can get hold of this. Informix site at
www.informix.com/evaluate..has for every OS other than
Linux

Thanks
Marios


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




Re: [PHP-DB] db2

2001-02-12 Thread Marios Moutzouris

Will my db2 connection (using odbc_connect and the CLI driver) close when the script 
ends, or should I always call odbc_close?

It should. otherwise if something goes wrong in the script, then connection still open.

One of the disadvantages of pconnect. Ended up DOS'ing the AS400 ;-)

marios

_
Valentines Day Special Offer:
1 Dozen Long Stemmed Red Roses including a FREE box of Cadbury's Milk Tray for only 
R199.
Place your order before the 5th of February and get FREE delivery. 
http://www.netactive.co.za/linktrack/track.asp?rc=nflpe
Message Sent Using NetActive Personal
_


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




Re: [PHP-DB] Connectivity to AS/400

2001-02-04 Thread Marios Moutzouris

 I'm going to be trying to connect to the native DB2 database in a AS/400
 So far thats all I know about the IBM side.

 Can someone give me a short update on what options I have ?

 - JDBC - exec an external program.
 - unixODBC ...etc.
 - PHP with native ibm db2 support

I have successfully connected built a front end application to a AS/400
using the 3rd option. So can help there.

marios moutzouris


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