Re: [PHP-DB] Array trouble

2003-01-24 Thread Jason Wong
On Friday 24 January 2003 14:18, Tyler Whitesides wrote:

 I have been having a lot of trouble getting an array into the MySQL table
 like I want it.  This is supposed to take the current maintenance tasks
 from a table in the database on apple.php each of these is given a name
 $item[autoNo] where autoNo is the auto_increment id that task is associated
 with.  This is passed to data.php where it is supposed to make a row in the
 maintenanceditems table, then in a loop directly below that it is supposed
 to run the array and place each array value into its associated column in
 the database.  Considering all of the columns exist, I think the problem
 just has to do with how I am pulling the array values out and placing them
 into their column.  Any help would be appreciated. Thanks in advance,

Please post your code and DB schema.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *


/*
Don't worry if you're a kleptomaniac; you can always take something for it.
*/


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




RE: [PHP-DB] PHP MySQL: temporary table problem

2003-01-24 Thread Bruno Pereira
I would like to know, if there is any change to export/import data from
SQL/EXCEL/SQL with php??? It?s very important. So if someone knows a way
please help me.
Thanks.

Cumprimentos

Bruno Pereira
[EMAIL PROTECTED]

-Original Message-
From: Damir Dezeljin [mailto:[EMAIL PROTECTED]]
Sent: sexta-feira, 24 de Janeiro de 2003 8:18
To: PHP-db list
Subject: [PHP-DB] PHP  MySQL: temporary table problem


Hi.

I got a task to program a search engine for a site which is all around
based on sessions and persistent connections to MySQL.

The problem is that I first have to select a subset of those data
and then I have to join them all around and output results.

I'm using temporary tables for this but there is a problem.
Temporary tables are visible trough the entire connection. So in future
one browser window can interact (can display) with results from another
browser window. Does anyone have a sugestion how to solve this?

I was thinking to close a persistent connection (I don't know how???) on
each result page at the begining and then reopen it at the end ... for my
code I was thinking on using normal connections.

Any better idea?

I thik I just can't live without temporary tables till I will not have
subqueryes.

Regards,
Dezo


--
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] Import and export data from php/mysql

2003-01-24 Thread Bruno Pereira
I would like to know, if there is any change to export/import data from
MySQL/EXCEL/MySQL with php??? It's very important. So if someone knows a way
please help me.
Thanks.

Cumprimentos

Bruno Pereira
[EMAIL PROTECTED]


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




Re: [PHP-DB] Where can I get an extention to connect to PostgeSQLDB on Unix?

2003-01-24 Thread Alberto Grájeda C.
I will give you some tips:
* With phpinfo verify that you have included the module in the 
configuration. Something like --with-pgsql=shared
* In php.ini enable extension=pgsql.so
* In php.ini, search extension_dir, and in that location (normaly 
/usr/lib/php4) copy the module (archive) pgsql.so.

Chau.
Alberto.


On Thu, 23 Jan 2003, Yurij Nykon wrote:

 Hi.
 
 We have an FreeBSD 4.5 with php4 installed on it.
 Now we need to connect from our php-Project to PostgreSQL-7.3.1.
 But there is no php-extention installed. In Windows distribution it is
 available.
 Where can we get this extention for Unix?
 
 Any help will be appreciated
 Thanx in advance
 Yurij Nykon
 


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




Re: [PHP-DB] Import and export data from php/mysql

2003-01-24 Thread Ignatius Reilly
What is your problem exactly?

Have you investigated the MySQL manual under:
LOAD DATA INFILE
SELECT ... INTO OUTFILE ?

Ignatius

- Original Message -
From: Bruno Pereira [EMAIL PROTECTED]
To: PHP-db list [EMAIL PROTECTED]
Sent: Friday, January 24, 2003 1:51 PM
Subject: [PHP-DB] Import and export data from php/mysql


 I would like to know, if there is any change to export/import data from
 MySQL/EXCEL/MySQL with php??? It's very important. So if someone knows a
way
 please help me.
 Thanks.

 Cumprimentos

 Bruno Pereira
 [EMAIL PROTECTED]


 --
 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] PHP MySQL: temporary table problem

2003-01-24 Thread Damir Dezeljin
Hi.

 I would like to know, if there is any change to export/import data from
 SQL/EXCEL/SQL with php??? It?s very important. So if someone knows a way
 please help me.
HeHe ... I don't know how this is related to my question, but.

To import directly in Excel from MySQL, you can use MyODBC (I sugest you
to use development version).

If you want just to export from Excel and iport into MySQL, just do an
DOS (I think that .csv) export of data and try using LOAD DATA INFILE
(check mysql options how to set a field separator ... you will easly set
this in excel export),...


If anyone want to check my question, see below ;)

 I got a task to program a search engine for a site which is all around
 based on sessions and persistent connections to MySQL.

 The problem is that I first have to select a subset of those data
 and then I have to join them all around and output results.

 I'm using temporary tables for this but there is a problem.
 Temporary tables are visible trough the entire connection. So in future
 one browser window can interact (can display) with results from another
 browser window. Does anyone have a sugestion how to solve this?

 I was thinking to close a persistent connection (I don't know how???) on
 each result page at the begining and then reopen it at the end ... for my
 code I was thinking on using normal connections.

 Any better idea?

 I thik I just can't live without temporary tables till I will not have
 subqueryes.


Regards,
Dezo


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




Re: [PHP-DB] Where can I get an extention to connect to PostgeSQL DB on Unix?

2003-01-24 Thread Yurij Nykon
Where can I get thid module - pgsql.so???



Alberto grájeda c. [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I will give you some tips:
 * With phpinfo verify that you have included the module in the
 configuration. Something like --with-pgsql=shared
 * In php.ini enable extension=pgsql.so
 * In php.ini, search extension_dir, and in that location (normaly
 /usr/lib/php4) copy the module (archive) pgsql.so.

 Chau.
 Alberto.


 On Thu, 23 Jan 2003, Yurij Nykon wrote:

  Hi.
 
  We have an FreeBSD 4.5 with php4 installed on it.
  Now we need to connect from our php-Project to PostgreSQL-7.3.1.
  But there is no php-extention installed. In Windows distribution it is
  available.
  Where can we get this extention for Unix?
 
  Any help will be appreciated
  Thanx in advance
  Yurij Nykon
 




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




RE: [PHP-DB] ms sql limit equivalence

2003-01-24 Thread Grant, Dean (OIT)
Thanks! I was going to write and say that I have been using ADODB but was
unable to make the SelectLimit function work using MS SQL, but I decided to
take a look at my setup one more time.  I have setup my own abstraction
layer on top of ADODB so that I can override some of the default functions
and or adjust them as need be, but it appears that when I wrote the
interface to the SelectLimit function I neglected to send the $nrows and
$offset values to ADODB.  It is now fixed and working nicely.  Thanks again
for the advice.

Dean
-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 23, 2003 8:21 PM
To: Grant, Dean (OIT); [EMAIL PROTECTED]
Subject: RE: [PHP-DB] ms sql limit equivalence

 I am just joining this list so if this has been covered in the past I
 apologize.  I am working with MS SQL and would like the functionality
that
 MySQL's limit function provides.  I understand that MS SQL has no such
 command or equivalent. Has someone found a way to use standard (or MS
SQL
 specific) SQL to achieve the same goal?  I have seen bits and pieces
of
 code
 and ideas here and there, but nothing seems to work.  Any advice would
be
 appreciated.

In addition to the TOP suggestions, you may want to check out some of
the Abstraction layers out there, i.e. PEAR or ADOdb. I'm pretty sure
they replicate the LIMIT function somehow. You can use one of those
programs or just take when they do and adapt to your needs.

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/


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




[PHP-DB] function needed

2003-01-24 Thread Shahar Tal
Hey

I'm looking and wondering for a function, as i'm trying to do something, and
here it is.

I'm using the SSI call :
 !--#echo var=HTTP_HOST --.
to get the domain name I am on. this will output

www.domain.com.

I would like to use PHP in order to take this string, the output, and cut
the www. and the .com from it, so only the domain will remain.
ofcourse we can also have situations whith .org and .net and even where
there's no www. but the main thing I need is to remove whats
after the second dot and before the first dot, along with the dots.

I don't mind writing all the posibilities to the function, ie, all the
possible extenstions that the function may need to cut, I just need it to
take
the text from the SSI, and cut everything but the domain part, which is
the address itself.

what would be the best way to do it?
thank you!!



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




RE: [PHP-DB] function needed

2003-01-24 Thread Hutchins, Richard
Try searching www.phpclasses.org. I'm almost positive it's been written
before and if it exists, this is a great place to start looking for it.

 -Original Message-
 From: Shahar Tal [mailto:[EMAIL PROTECTED]]
 Sent: Friday, January 24, 2003 12:45 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] function needed
 
 
 Hey
 
 I'm looking and wondering for a function, as i'm trying to do 
 something, and
 here it is.
 
 I'm using the SSI call :
  !--#echo var=HTTP_HOST --.
 to get the domain name I am on. this will output
 
 www.domain.com.
 
 I would like to use PHP in order to take this string, the 
 output, and cut
 the www. and the .com from it, so only the domain will remain.
 ofcourse we can also have situations whith .org and .net 
 and even where
 there's no www. but the main thing I need is to remove whats
 after the second dot and before the first dot, along with the dots.
 
 I don't mind writing all the posibilities to the function, ie, all the
 possible extenstions that the function may need to cut, I 
 just need it to
 take
 the text from the SSI, and cut everything but the domain 
 part, which is
 the address itself.
 
 what would be the best way to do it?
 thank you!!
 
 
 
 -- 
 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] function needed

2003-01-24 Thread heilo
Hi!

I hope I understood you right... I would use PCREs:

?php

function getdomainname($string)
{
$pattern = '#(([[:alnum:]]+)(\.))?(.+)(\.)([[:alnum:]]+)#i';
$replace = '\\4';
return preg_replace($pattern, $replace, $string);
}

$var = $_SERVER['SERVER_NAME'];

echo getdomainname($var);

?


.ma

Shahar Tal [EMAIL PROTECTED] [EMAIL PROTECTED] 18:44 Uhr:

 Hey
 
 I'm looking and wondering for a function, as i'm trying to do something, and
 here it is.
 
 I'm using the SSI call :
 !--#echo var=HTTP_HOST --.
 to get the domain name I am on. this will output
 
 www.domain.com.
 
 I would like to use PHP in order to take this string, the output, and cut
 the www. and the .com from it, so only the domain will remain.
 ofcourse we can also have situations whith .org and .net and even where
 there's no www. but the main thing I need is to remove whats
 after the second dot and before the first dot, along with the dots.
 
 I don't mind writing all the posibilities to the function, ie, all the
 possible extenstions that the function may need to cut, I just need it to
 take
 the text from the SSI, and cut everything but the domain part, which is
 the address itself.
 
 what would be the best way to do it?
 thank you!!
 
 



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




RE: [PHP-DB] function needed

2003-01-24 Thread Ryan Marrs
?
function stripdomain($string)
{
if(stristr($string, co.))
{
$string = ereg_replace(.co., .,
$string);
}
$end = strrpos($string, .);
$string = substr($string, 0, $end);
while(strchr($string, .))
{
$start = strpos($string, .);
$string = substr($string, $start+1);
}
return $string;
}
?

There we go.  This one also parses .co.uk, which frustrated me there for a
minute, but oh well, I'm over it.  I don't believe there are any others that
will slip by this, but of course I can't be certain.

Give it a shot, see if it does what you need.  I tested it with:

Print
stripdomain(this.will.irritate.me.if.I.don't.figure.it.out.soon.co.uk);
It returned with soon

___
Ryan Marrs
Web Developer
Sandler  Travis Trade Advisory Services, Inc.
248.474.7200 x 183
248.474.8500 (fax)
www.strtrade.com


-Original Message-
From: heilo [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 24, 2003 1:27 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] function needed

Hi!

I hope I understood you right... I would use PCREs:

?php

function getdomainname($string)
{
$pattern = '#(([[:alnum:]]+)(\.))?(.+)(\.)([[:alnum:]]+)#i';
$replace = '\\4';
return preg_replace($pattern, $replace, $string);
}

$var = $_SERVER['SERVER_NAME'];

echo getdomainname($var);

?


.ma

Shahar Tal [EMAIL PROTECTED] [EMAIL PROTECTED] 18:44 Uhr:

 Hey
 
 I'm looking and wondering for a function, as i'm trying to do something,
and
 here it is.
 
 I'm using the SSI call :
 !--#echo var=HTTP_HOST --.
 to get the domain name I am on. this will output
 
 www.domain.com.
 
 I would like to use PHP in order to take this string, the output, and cut
 the www. and the .com from it, so only the domain will remain.
 ofcourse we can also have situations whith .org and .net and even
where
 there's no www. but the main thing I need is to remove whats
 after the second dot and before the first dot, along with the dots.
 
 I don't mind writing all the posibilities to the function, ie, all the
 possible extenstions that the function may need to cut, I just need it to
 take
 the text from the SSI, and cut everything but the domain part, which is
 the address itself.
 
 what would be the best way to do it?
 thank you!!
 
 



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

2003-01-24 Thread 1LT John W. Holmes
You could also use this:

function getdomainname($name)
{
$parts = explode('.',$name);
return $parts[count($parts)-2];
}

which will always return the second to last section when divided up by the
periods. So it will return 'domain' for all of the following:

www.domain.com
www.subdomain.domain.org
subdomain.domain.org
domain.museum

---John Holmes...

- Original Message -
From: heilo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 24, 2003 1:27 PM
Subject: Re: [PHP-DB] function needed


 Hi!

 I hope I understood you right... I would use PCREs:

 ?php

 function getdomainname($string)
 {
 $pattern = '#(([[:alnum:]]+)(\.))?(.+)(\.)([[:alnum:]]+)#i';
 $replace = '\\4';
 return preg_replace($pattern, $replace, $string);
 }

 $var = $_SERVER['SERVER_NAME'];

 echo getdomainname($var);

 ?


 .ma

 Shahar Tal [EMAIL PROTECTED] [EMAIL PROTECTED] 18:44 Uhr:

  Hey
 
  I'm looking and wondering for a function, as i'm trying to do something,
and
  here it is.
 
  I'm using the SSI call :
  !--#echo var=HTTP_HOST --.
  to get the domain name I am on. this will output
 
  www.domain.com.
 
  I would like to use PHP in order to take this string, the output, and
cut
  the www. and the .com from it, so only the domain will remain.
  ofcourse we can also have situations whith .org and .net and even
where
  there's no www. but the main thing I need is to remove whats
  after the second dot and before the first dot, along with the dots.
 
  I don't mind writing all the posibilities to the function, ie, all the
  possible extenstions that the function may need to cut, I just need it
to
  take
  the text from the SSI, and cut everything but the domain part, which
is
  the address itself.
 
  what would be the best way to do it?
  thank you!!
 
 



 --
 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] simple mail attachment with php?

2003-01-24 Thread cornelia es said
hi you out there...
i hope you're all fine :)

has anybody an idea how to attach a simple text-file to the php
mail()-function???
the scripts i found on the net are quite complicated, featuring different
mime-types, more than one attachment,...

i really would need just the absolute basic functionality to send just ONE
attachment as .txt-file.
(i think this would also be the best way for me to understand the concept ;)

THANKS A LOT in advance
and have a very nice weekend :)
cornelia



cornelia es said

spacedealeragentur für online media GmbH

internet marketing consulting



[Strasse] paul lincke ufer 42_43  [Ort]  Berlin  10999

[Fon] + 49_030 69 53 50 16[Fax] +49_030 69 53 50 77

[www.] spacedealer.de













Re: [PHP-DB] function needed

2003-01-24 Thread 1LT John W. Holmes
But what about www.domain.co.uk, you ask? Well, it'll fail with this. :)

Just filter out the 'co.' like the other function that was posted and this
will still work.

---John Holmes...

- Original Message -
From: 1LT John W. Holmes [EMAIL PROTECTED]
To: heilo [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, January 24, 2003 1:58 PM
Subject: Re: [PHP-DB] function needed


 You could also use this:

 function getdomainname($name)
 {
 $parts = explode('.',$name);
 return $parts[count($parts)-2];
 }

 which will always return the second to last section when divided up by the
 periods. So it will return 'domain' for all of the following:

 www.domain.com
 www.subdomain.domain.org
 subdomain.domain.org
 domain.museum

 ---John Holmes...

 - Original Message -
 From: heilo [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, January 24, 2003 1:27 PM
 Subject: Re: [PHP-DB] function needed


  Hi!
 
  I hope I understood you right... I would use PCREs:
 
  ?php
 
  function getdomainname($string)
  {
  $pattern = '#(([[:alnum:]]+)(\.))?(.+)(\.)([[:alnum:]]+)#i';
  $replace = '\\4';
  return preg_replace($pattern, $replace, $string);
  }
 
  $var = $_SERVER['SERVER_NAME'];
 
  echo getdomainname($var);
 
  ?
 
 
  .ma
 
  Shahar Tal [EMAIL PROTECTED] [EMAIL PROTECTED] 18:44 Uhr:
 
   Hey
  
   I'm looking and wondering for a function, as i'm trying to do
something,
 and
   here it is.
  
   I'm using the SSI call :
   !--#echo var=HTTP_HOST --.
   to get the domain name I am on. this will output
  
   www.domain.com.
  
   I would like to use PHP in order to take this string, the output, and
 cut
   the www. and the .com from it, so only the domain will remain.
   ofcourse we can also have situations whith .org and .net and even
 where
   there's no www. but the main thing I need is to remove whats
   after the second dot and before the first dot, along with the dots.
  
   I don't mind writing all the posibilities to the function, ie, all the
   possible extenstions that the function may need to cut, I just need it
 to
   take
   the text from the SSI, and cut everything but the domain part, which
 is
   the address itself.
  
   what would be the best way to do it?
   thank you!!
  
  
 
 
 
  --
  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




RE: [PHP-DB] function needed

2003-01-24 Thread Ryan Marrs
Well I lost the race as well, because I failed to account for .com.br, or
.com.at, or any of those other rarely used ones.

Bah...

___
Ryan Marrs
Web Developer
Sandler  Travis Trade Advisory Services, Inc.
248.474.7200 x 183
248.474.8500 (fax)
www.strtrade.com


-Original Message-
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 24, 2003 2:02 PM
To: 1LT John W. Holmes; heilo; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] function needed

But what about www.domain.co.uk, you ask? Well, it'll fail with this. :)

Just filter out the 'co.' like the other function that was posted and this
will still work.

---John Holmes...

- Original Message -
From: 1LT John W. Holmes [EMAIL PROTECTED]
To: heilo [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, January 24, 2003 1:58 PM
Subject: Re: [PHP-DB] function needed


 You could also use this:

 function getdomainname($name)
 {
 $parts = explode('.',$name);
 return $parts[count($parts)-2];
 }

 which will always return the second to last section when divided up by the
 periods. So it will return 'domain' for all of the following:

 www.domain.com
 www.subdomain.domain.org
 subdomain.domain.org
 domain.museum

 ---John Holmes...

 - Original Message -
 From: heilo [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, January 24, 2003 1:27 PM
 Subject: Re: [PHP-DB] function needed


  Hi!
 
  I hope I understood you right... I would use PCREs:
 
  ?php
 
  function getdomainname($string)
  {
  $pattern = '#(([[:alnum:]]+)(\.))?(.+)(\.)([[:alnum:]]+)#i';
  $replace = '\\4';
  return preg_replace($pattern, $replace, $string);
  }
 
  $var = $_SERVER['SERVER_NAME'];
 
  echo getdomainname($var);
 
  ?
 
 
  .ma
 
  Shahar Tal [EMAIL PROTECTED] [EMAIL PROTECTED] 18:44 Uhr:
 
   Hey
  
   I'm looking and wondering for a function, as i'm trying to do
something,
 and
   here it is.
  
   I'm using the SSI call :
   !--#echo var=HTTP_HOST --.
   to get the domain name I am on. this will output
  
   www.domain.com.
  
   I would like to use PHP in order to take this string, the output, and
 cut
   the www. and the .com from it, so only the domain will remain.
   ofcourse we can also have situations whith .org and .net and even
 where
   there's no www. but the main thing I need is to remove whats
   after the second dot and before the first dot, along with the dots.
  
   I don't mind writing all the posibilities to the function, ie, all the
   possible extenstions that the function may need to cut, I just need it
 to
   take
   the text from the SSI, and cut everything but the domain part, which
 is
   the address itself.
  
   what would be the best way to do it?
   thank you!!
  
  
 
 
 
  --
  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 Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Basic HTTP authentication

2003-01-24 Thread web man
hi GUys
Please this may sound too elementary but 
I need your help.
How can I configure apache httpd.con file in
order to support the use of Basic HTTP authentication.
I am using apache 1.3.26 on windows.
Thanks 



-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


[PHP-DB] Basic HTTP authentication

2003-01-24 Thread web man
hi GUys
Please this may sound too elementary but 
I need your help.
How can I configure apache httpd.con file in
order to support the use of Basic HTTP authentication.
I am using apache 1.3.26 on windows.
Thanks 



-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


[PHP-DB] SQL very fast here very slow there

2003-01-24 Thread Paolo Bonavoglia
I have realized a php web page with this heavy SQL query, necessary to 
show a list of students:

$sqlcom = SELECT Alunni.Cod_Alunno, Nome, Cognome, Scritto, Orale, Assenze
 FROM Alunni, Scrutini, Iscritti
 WHERE Alunni.Cod_Alunno = Scrutini.Alunno AND Scrutini.Alunno = 
Iscritti.Cod_Alunno
 AND Scrutini.Anno = Iscritti.Anno AND Iscritti.Anno = $Anno
 AND Iscritti.Classe = $Classe AND Scrutini.Materia = '$Materia'
ORDER BY Cognome, Nome;
$alunni  = odbc_connect(Orario, admin,  );
$cur = odbc_exec($alunni, $sqlcom);
...

The three tables are rather big (about 9000 records); they are Paradox 
tables which php sees through the Windows ODBC interface.

I have two copies of this DB one on my home PC (Athlon XP 1600, with 
Win-XP, Apache 1.3.27 and Php 4.3), the other on the server of my school 
(HP e200 Pentium 1000 with Windows 2000) which works as a web server with 
Apache 1.3.24 and Php 4.23.

Now something very strange happens: on my home PC the Select works 
perfectly and is executed in a flash, the web page appearing in less than 
one second.
On the Win2000 server the same SQL command behaves extremely slow and takes 
up to 60 seconds to execute and show, and is very often timed out. There is 
no difference executing the command directly on the server or from a PC 
connected to the server in the LAN.

I understand that a server has to share his time and resources ... but such 
a huge difference is really surprising for me. And I have many other SQL 
queries working decently on the server.

I've lookeed for differences between php.ini files, but found nothing of 
meaning.

Any ideas? Is there a way to speed up this command on the server?

Thanks to anybody which can help me!


Paolo Bonavoglia
---
Docente di Matematica e Fisica
Responsabile Lab.Informatica e sito Web

Liceo Classico Marco Foscarini
Cannaregio 4942
I 30121   VENEZIA

Tel. 041,5224845
Fax 041,5201657

E-Mail [EMAIL PROTECTED]

--
Pagine Web   http://www.liceofoscarini.it/



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



Re: [PHP-DB] SQL very fast here very slow there

2003-01-24 Thread Brent Baisley
I'm not sure how Paradox works, but it may be locking problems you are 
running into. I know Paradox used to have issues with data changing 
while a query was executing. On your home machine you are the only one 
accessing the DB, so there wouldn't be any contention. Your home DB 
probably hits the cache since the data isn't changing.
How busy is the DB at school?

There is really nothing in your question applicable to PHP. Have you 
tried a Paradox list?

On Friday, January 24, 2003, at 04:16 PM, Paolo Bonavoglia wrote:

Now something very strange happens: on my home PC the Select works 
perfectly and is executed in a flash, the web page appearing in less 
than one second.
On the Win2000 server the same SQL command behaves extremely slow and 
takes up to 60 seconds to execute and show, and is very often timed 
out. There is no difference executing the command directly on the 
server or from a PC connected to the server in the LAN.

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


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




[PHP-DB] Re: function needed

2003-01-24 Thread Windi of NylonCoffee
Hi! This shouid be good:

?php
function getdomainname($name)
{
 if(substr($name,0,4)=='www.') $name = substr($name,4,(strlen($name)-4));
 return substr($name,0,strrpos($name,.));
}

echo getdomainname('www.nyloncoffee.interpc.pl');
?

short, nice and it's work good :)

- Original Message -
From: Shahar Tal [EMAIL PROTECTED]
Newsgroups: php.db
To: [EMAIL PROTECTED]
Sent: Friday, January 24, 2003 6:44 PM
Subject: function needed


 Hey

 I'm looking and wondering for a function, as i'm trying to do something,
and
 here it is.

 I'm using the SSI call :
  !--#echo var=HTTP_HOST --.
 to get the domain name I am on. this will output

 www.domain.com.

 I would like to use PHP in order to take this string, the output, and cut
 the www. and the .com from it, so only the domain will remain.
 ofcourse we can also have situations whith .org and .net and even
where
 there's no www. but the main thing I need is to remove whats
 after the second dot and before the first dot, along with the dots.

 I don't mind writing all the posibilities to the function, ie, all the
 possible extenstions that the function may need to cut, I just need it to
 take
 the text from the SSI, and cut everything but the domain part, which is
 the address itself.

 what would be the best way to do it?
 thank you!!





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




[PHP-DB] Uploading and displaying Jpeg images through Path reference /text from mysql

2003-01-24 Thread Geckodeep
Hello There,
I wondered if any one could help me with this problem.
I am helping a friend with his web site which is a content management
system. to tell you the truth i am a beginner in Php/Mysql and this is my
first experience.
The table is called REPORT and it has a Field for REPORT_Title another for
The REPORT itself and 9 fields to upload IMAGES with 9 corresponding fields
to describe the 9 images.
This REPORT table is linked to another Table for categories called CAT to
choose the catagorie.

The question is how will i put this to gether, I have spend my whole day
looking for answer. Due to Size limitation 4Go per table in MySql, I chose
not to insert as binary(BLOB) instead Through path reference of the image.As
it's possible to insert hundreds of articles with images. To be on the safe
side i prefer to use the Path reference techniques.

I thank you'll in advance for your advice.

GD



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




Re: [PHP-DB] Basic HTTP authentication

2003-01-24 Thread Rajesh Fowkar
On Fri, Jan 24, 2003 at 11:50:09AM -0800, web man wrote:

hi GUys
Please this may sound too elementary but 
I need your help.
How can I configure apache httpd.con file in
order to support the use of Basic HTTP authentication.
I am using apache 1.3.26 on windows.

Take a look at the Apache manual. Everything there is to the point,
precise and very easy to understand.

Peace

--
Rajesh
:
[ GNU/Linux One Stanza Tip (LOST) ]###

Sub : Knowing contents of .tbz files LOST #358

Knowing the contents of a .tbz file is a one step process:
$tar -tyvf filename.tbz | less
A .tbz file is essentially a bzipped-tarball (.tar.bz) file.

[EMAIL PROTECTED]
:

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




[PHP-DB] sql query links

2003-01-24 Thread david
i'm starting out in this whole thing, and i'm trying to program a zine that
uses a sql database for content and calls the content into a template.  what
i am unclear on how to do is set up the links so that I can get the info
from the database.  anyone willing to help me out?



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




[PHP-DB] Calling functions recursively

2003-01-24 Thread Kevin Gordon
Can functions / methods be called recursively? If so how can this be
done? Comments much appreciated.
Kevin Gordon




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




Re: [PHP-DB] Calling functions recursively

2003-01-24 Thread Roberto Plomp
Kevin,

Have fun and be sure to guarantee the prevent never ending looping.

Roberto

?php
function RecursiveFunction($aCounter)
 {
 if($aCounter = 10)
  {
  echo brCounting to ten: $aCounter\n;
  $aCounter++;
  RecursiveFunction($aCounter);
  }
 }
?

- Original Message - 
From: Kevin Gordon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, January 25, 2003 7:49 AM
Subject: [PHP-DB] Calling functions recursively


 Can functions / methods be called recursively? If so how can this be
 done? Comments much appreciated.
 Kevin Gordon
 
 
 
 
 -- 
 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