[PHP-DB] recursion
Hi, Does PHP4 support recursive function ivocation? It seemed tome that it does not, because the code below doesn't work properly. function RecPrintDeps($arr, $depth=0){ //print_r($arr); $depth++; printf("H$deptha href=\"%s?dep=%s\"%s/a/H$depth", $HTTP_SELF, $arr[0], $arr[2]); while(list($k,$v)=each($this-$deptree)){ if($v[1]==$arr[0]) $this-RecPrintDeps($v,$depth); } } The function is a member of a class. Regards, Andrew Kozachenko Programmer Ukraine International Airlines -- 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]
AW: [PHP-DB] recursion
Hi Andrew, This works fine: // Prints out an array recursiv function print_array( $array, $seperator = "" ) { while ( list( $key, $val ) = each($array) ) { if ( is_array( $val ) ) { print_array( $val, $seperator." = ".$key ); } else { echo "$seperator = $key = $valBR\n"; } } echo "BR\n"; } Hope this helps. BTW: the [PHP-DB]-List isn't the right one for this question =8) Greetinx, Mike (Germany) -Ursprungliche Nachricht- Von: Andrew [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 30. Januar 2001 09:18 An: PHP-DB Betreff: [PHP-DB] recursion Hi, Does PHP4 support recursive function ivocation? It seemed tome that it does not, because the code below doesn't work properly. function RecPrintDeps($arr, $depth=0){ //print_r($arr); $depth++; printf("H$deptha href=\"%s?dep=%s\"%s/a/H$depth", $HTTP_SELF, $arr[0], $arr[2]); while(list($k,$v)=each($this-$deptree)){ if($v[1]==$arr[0]) $this-RecPrintDeps($v,$depth); } } The function is a member of a class. Regards, Andrew Kozachenko Programmer Ukraine International Airlines -- 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] Streaming a file from DB over SSL using IE
Hi all, Just a quick one, is there anyone out there who has managed to successfully store a file (other than text) in a database (I am using MySQL) and then stream it out dynamically to a user, on an SSL enabled server, to a client using Internet Explorer? I have tried nearly everything I could possibly think of (a couple really dodgy work-arounds remain..) to no avail. Currently my system works for every browser under the sun (including lynx surprisingly!) except i cannot download any of the files saved in the database on an IE client. Thanks Beau -- Beau Lebens - Web Master Insurance My Way, Your Friendly Online Broker (08) 9226 5888 http://www.insurancemyway.com.au/ -- 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] Which Virus was it?
Hey there ppl! What was the name of the virus that was sent to this list??? -Trond? -- 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] Install PHP with custom ODBC
Thanks for reading my question! I would like to install PHP on Linux to connect MS SQL server in another computer (Win NT). I have install the ODBC Client Components on Linux and OpenLink Generic 32 bit driver on Win NT. After configurating, the connect test is successful. So I try to start to install PHP, but when making, it seems that PHP cannot found the ODBC driver. Acutally I have install ODBC Client Components on "/usr/local". When I install PHP... I have typed... ./configure --with-custom-odbc=/usr/local --with-apache=../apache_1.3.12 --enable-track-vars Then when making, it prompt that odbc.h cannot be found! Do I do anything wrong? Thanks for your help!!! -- 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] Install PHP with custom ODBC
1. Instead of customodbc, you should use --with-openlink=/usr/local/openlink/ 2 .Are you sure it asks that odbc.h can't be found ? Or is it that you recieve this error: php_odbc.c: In function `odbc_column_lengths': php_odbc.c:606: `SQLINTEGER' undeclared (first use in this function) php_odbc.c:606: (Each undeclared identifier is reported only once php_odbc.c:606: for each function it appears in.) php_odbc.c:606: parse error before `len' php_odbc.c:634: `len' undeclared (first use in this function) make[3]: *** [php_odbc.lo] Error 1 To fix it, change line 606 : "SQLINTEGER len;" should be replaced by "SDWORD len;" 3. You are using MS SQL. Why not use the MS SQL functions "built in" to PHP ? They are ALOT faster, more reliable etc than ODBC functions. Plus, a VERY useful functoin, mssql_num_rows function works, whereas odbc_num_rows() does not. See http://php.net/mssql Siggy - Original Message - From: "WC Ip" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 30, 2001 10:15 PM Subject: [PHP-DB] Install PHP with custom ODBC Thanks for reading my question! I would like to install PHP on Linux to connect MS SQL server in another computer (Win NT). I have install the ODBC Client Components on Linux and OpenLink Generic 32 bit driver on Win NT. After configurating, the connect test is successful. So I try to start to install PHP, but when making, it seems that PHP cannot found the ODBC driver. Acutally I have install ODBC Client Components on "/usr/local". When I install PHP... I have typed... ./configure --with-custom-odbc=/usr/local --with-apache=../apache_1.3.12 --enable-track-vars Then when making, it prompt that odbc.h cannot be found! Do I do anything wrong? Thanks for your help!!! -- 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]
Re: [PHP-DB] Error in accessing the database through MySQL
Why are you using php3.0.17? That is atleast 6 months old! You have downloaded a version of PHP which doesn't have MySQL functions built in. Beacuse you are using the Win32 version, you should just use PHP4 (the latest version), which WILL have MySQL functions built in. Go to http://www.php.net/downloads.php Siggy - Original Message - From: "Devang P. Shah" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, December 31, 2000 11:13 PM Subject: [PHP-DB] Error in accessing the database through MySQL Dear Sir/Mam, I am learing to use your php version "php-3_0_17-win32" downloded from your site. I am having MySQL installed on my computer. When I try to connect to a database through "mysql_connect()" it shows error that " Fatal error: Call to unsupported or undefined function mysql_connect() in e:\shhtml\dbfwork.php on line 7" where dbfwork.php is my file. Please help me. Thankyou. Devang P. Shah. -- 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] RE: [PHP] question ! show binary
Why on the earth would you do that? It always happens to me associate images with my databases but I never actually insert them in. I just *copy* these graphics to somewhere on my server (or often even on in a webroot) and give them a logic name. So then when you need to call a graphic you do ( in case the images are in the webroot ): ? $img_dir = '/images'; $img_path = $img_dir.$id_from_db . '.gif'; if(file_exests($DOCUMENT_ROOT.$img_path)) echo 'IMG SRC="' . $img_path . '"'; ? then here you can eve find out what are they look like ... GetImageSize() etc ... Hope this is something that helps. Cheers, Maxim Maletsky -Original Message- From: Yui Hiroaki [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 31, 2001 2:12 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] question ! show binary HI! I am using PHP in mySQL. I create table in database and insert 'binary'(*.gif). But I do not know how to use this binary using PHP and show website. Please help me. $)create table xxx (col longlob); $)insert into xxx values("image\yyy.gif"); I want to display :yyy.gif in html Thank you yui -- 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 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]