Re: [PHP-DB] explode() and a database call...?

2004-05-19 Thread Tristan . Pretty
Already doing that, and it works:
(I have checked the overall value of
 TPrsc $row[bands] and it does contain 1, 4, 12, 32)

Really bugging me now (no pun intended)!
Any other ideas? It's gotta be simple..!





Torsten Roehr [EMAIL PROTECTED] 
18/05/2004 18:24

To
[EMAIL PROTECTED]
cc

Subject
Re: [PHP-DB] explode() and a database call...?






Tristan Pretty [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
.
com...
 HH, didn't work...?

Please echo out $row['bands'] and post the contents.

Regards, Torsten







 Mikhail U. Petrov [EMAIL PROTECTED]
 18/05/2004 16:20
 Please respond to
 Mikhail U. Petrov [EMAIL PROTECTED]


 To
 [EMAIL PROTECTED]
 cc
 [EMAIL PROTECTED]
 Subject
 Re: [PHP-DB] explode() and a database call...?






 Hi!
 You should use $row[bands].
 But maybe it's only typing error.
 I use such methos and have no errors.

 Tuesday, May 18, 2004, 7:02:34 PM, Tristan wrote:

 TPrsc I'm trying to split up a field from a database that contains a 
list
 of
 TPrsc No's (Eg:1, 4, 12, 32)
 TPrsc If I do:
 TPrsc $bands_array = explode(,, 1, 4, 12, 32);

 TPrsc I get the following array:
 TPrsc $bands_array[0] = 1
 TPrsc $bands_array[1] = 4
 TPrsc $bands_array[2] = 12
 TPrsc $bands_array[3] = 32

 TPrsc All good!
 TPrsc However...
 TPrsc Calling froma database...
 TPrsc $bands_array = explode(',', $row[bands]);

 TPrsc I get no values in the array, (I have checked the overall value 
of
 TPrsc $row[bands] and it does contain 1, 4, 12, 32)

 TPrsc os my question is: why is the database call, changing how explode
 works?

 TPrsc Tris...?


 TPrsc
 *
 TPrsc The information contained in this e-mail message is intended only
 for
 TPrsc the personal and confidential use of the recipient(s) named 
above.
 TPrsc If the reader of this message is not the intended recipient or an
 agent
 TPrsc responsible for delivering it to the intended recipient, you are
 hereby
 TPrsc notified that you have received this document in error and that 
any
 TPrsc review, dissemination, distribution, or copying of this message 
is
 TPrsc strictly prohibited. If you have received this communication in
 error,
 TPrsc please notify us immediately by e-mail, and delete the original
 message.
 TPrsc
 ***



 --
 Best regards,
 Mikhail U. Petrov
 mailto:[EMAIL PROTECTED]

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





 *
 The information contained in this e-mail message is intended only for
 the personal and confidential use of the recipient(s) named above.
 If the reader of this message is not the intended recipient or an agent
 responsible for delivering it to the intended recipient, you are hereby
 notified that you have received this document in error and that any
 review, dissemination, distribution, or copying of this message is
 strictly prohibited. If you have received this communication in error,
 please notify us immediately by e-mail, and delete the original message.
 ***

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





*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

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



[PHP-DB] search engine query

2004-05-19 Thread Bobo Wieland
Hi! I'm new to this list. I usually try to get my answers at the php-win
mailing list...

But since this is a mysql question I thought it would be better to ask i t
here;

How do I get the best result from a simple search (just one input box and a
search button) from a mysql db with two tables containing
the following fields;

_table1_
id (int) (primary)
title (varchar 40)
keywords (varchar 255 with a list of keywords separated with comma)
description (varchar 255 with fulltext index)
-

_table2_
f_key (int), page (int) (f_key is the same as id from table1 and f_key and
page combined is the primary)
text (text with fulltext index)
-


I guess you can see what the table represents... One article split in 1 to *
pages with one entry in table1 for all the common stuff...

I need to find the articles that fits the search the best (obviously... )...
I'm really not sure how to do this... There must be some general way that
people goes about this since it seems to me to be a quite common thing to
do...



.bobo

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



RE: [PHP-DB] Re: mail() function and AOL users

2004-05-19 Thread Ryan Jameson (USA)
I'm quite sure it's not a problem with the mail function. It's probably
the reverse dns configuration on your SMTP/sendmail server. AOL 
Verizon have been two real sticklers for that.

If you know the IP address that your server is sending the email from
you can use this:

http://www.dnsstuff.com/tools/ptr.ch?ip=YOURIPADDRESS

To check the revers dns resolution. You may be surprised.

 Ryan 

-Original Message-
From: Manuel Lemos [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 18, 2004 10:28 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: mail() function and AOL users

Hello,

On 12/12/2003 04:34 AM, Matt Perry wrote:
 I use the following php mail function in an online applicaiton
program:
 
 mail($email, application submitted, $message, From: 
 [EMAIL PROTECTED]);
 
 This function does not always work when I modify $message.  I have 
 checked for null values for $message already but this does not seem to

 be the problem.
 I am trying to develop some sort of pattern of when this function 
 works and when it does not.
 The only essential difference between the values I pass in for message

 is the one that does not always work includes a link.  Apparently 
 anyone useing AOL email is particularly vulnerable to this problem.
 
 Is it likely that AOL and other mail servers sometimes block any email

 from a web site if it has a link in the main body?  Or should I not be

 useing mail() in this manner to begin with?

Maybe you are not generating the message headers and body properly. 
Without seeing the code that you use to define $message, it is hard to
tell.

I just suggest that you try this class to properly compose and send your
messages:

http://www.phpclasses.org/mimemessage


-- 

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

--
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] Re: SQLite and PHP4

2004-05-19 Thread Eli White
Ok, I've solved my own problem ... leaving me with a question for anyone 
who is interested in answering it.

It seems that the default .ini file changed location on me from PHP 
4.3.4 to PHP 4.3.6 ... from the /php directory, to the /php/lib directory

Any reason this change occurred?  And that it wouldn't even look in the 
other/older directory for the config file?   Anyway, fixed now and it 
works like a charm.

Eli
Eli White wrote:
After playing around some with SQLite with PHP5, I decided that I wanted 
to have it working in PHP4 to start using it fully while waiting for 
PHP5 to come out.

However, I ran into a snag ... after downloading 
it/phpizeing/configure/make/makeinstall ... I added the 
extension=sqlite.so line to my server (Apache 1.3.31, Solaris) ... 
rebooted, and nothing happened.

My phpinfo page doesn't mention any sqlite support being added, I don't 
see any errors in Apache's error log, and any test scripts I write to 
use sqlite_open claim the function doesn't exist.

What have I missed here?
Thanks,
Eli
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Re: mail() function and AOL users

2004-05-19 Thread Daniel . Brunner
Hello!!

That's not always true.

I just sent mail using php to my AOL account, and it worked. The smtp 
mail server doesn't have a reverse dns lookup. 

His problem might be that the SMTP server he is using my be on the black 
list.

http://www.ordb.org/

This will cause a ton of problems.


It took me 3 weeks to get off that list!!!



Anyway...


Instead of sending it like this...

mail($email, application submitted, $message, From: 
[EMAIL PROTECTED]);


Do something like this...


$text = stripslashes($text);
$subject = stripslashes($sub);

$header = From: $From\nReply-To: $From\n;
$header .= Cc: $cc\n;
$header .= MIME-Version: 1.0\n;
$header .= Content-Type: text/plain\n;
$header .= Content-Transfer-Encoding: 8bnoit\n\n;
$header .= $text\n;

mail($To, $subject, , $header);


I alwasy like working with strings


Dan



-Original Message-
From: RJameson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 19, 2004 9:12 AM
To: php-db
Subject: RE: [PHP-DB] Re: mail() function and AOL users


I'm quite sure it's not a problem with the mail function. It's probably
the reverse dns configuration on your SMTP/sendmail server. AOL 
Verizon have been two real sticklers for that.

If you know the IP address that your server is sending the email from
you can use this:

http://www.dnsstuff.com/tools/ptr.ch?ip=YOURIPADDRESS

To check the revers dns resolution. You may be surprised.

 Ryan 

-Original Message-
From: Manuel Lemos [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 18, 2004 10:28 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: mail() function and AOL users

Hello,

On 12/12/2003 04:34 AM, Matt Perry wrote:
 I use the following php mail function in an online applicaiton
program:
 
 mail($email, application submitted, $message, From: 
 [EMAIL PROTECTED]);
 
 This function does not always work when I modify $message.  I have 
 checked for null values for $message already but this does not seem to

 be the problem.
 I am trying to develop some sort of pattern of when this function 
 works and when it does not.
 The only essential difference between the values I pass in for message

 is the one that does not always work includes a link.  Apparently 
 anyone useing AOL email is particularly vulnerable to this problem.
 
 Is it likely that AOL and other mail servers sometimes block any email

 from a web site if it has a link in the main body?  Or should I not be

 useing mail() in this manner to begin with?

Maybe you are not generating the message headers and body properly. 
Without seeing the code that you use to define $message, it is hard to
tell.

I just suggest that you try this class to properly compose and send your
messages:

http://www.phpclasses.org/mimemessage


-- 

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

--
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] Re: mail() function and AOL users

2004-05-19 Thread J-Michael Roberts
This is something I've been dealing with for a little too long.
AOL has a big list of methods they use to block what they think are 
spam.  Some of these things are:

- Reverse DNS Lookups: If you don't have an entry, your mail is dumped
- Mail Formatting: If the format of your message is not RFC Compliant, 
your mail is dumped.
- Open Relay Lists: If your IP is on a blacklist, your mail is dumped.
- MX Record Lookups: If the domain of your address does not have an MX 
record, your mail is dumped.
- Dynamic IP Lists: If you are on a (known) dynamically assigned IP 
address, your mail is dumped.
- Message Content: If your message contains obfuscated (hex-coded) 
URL's, your mail is dumped.
- Rolling Blockouts: Aol has been known to block whole blocks of IP's 
just because they feel like it.

The list goes on like this for awhile.  For more info, pay a visit to 
http://postmaster.info.aol.com/

--JMR
[EMAIL PROTECTED] wrote:
Hello!!
That's not always true.
I just sent mail using php to my AOL account, and it worked. The smtp 
mail server doesn't have a reverse dns lookup. 

His problem might be that the SMTP server he is using my be on the black 
list.

http://www.ordb.org/
This will cause a ton of problems.
It took me 3 weeks to get off that list!!!

Anyway...
Instead of sending it like this...
mail($email, application submitted, $message, From: 
[EMAIL PROTECTED]);

Do something like this...
$text = stripslashes($text);
$subject = stripslashes($sub);
$header = From: $From\nReply-To: $From\n;
$header .= Cc: $cc\n;
$header .= MIME-Version: 1.0\n;
$header .= Content-Type: text/plain\n;
$header .= Content-Transfer-Encoding: 8bnoit\n\n;
$header .= $text\n;
mail($To, $subject, , $header);
I alwasy like working with strings
Dan

-Original Message-
From: RJameson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 19, 2004 9:12 AM
To: php-db
Subject: RE: [PHP-DB] Re: mail() function and AOL users
I'm quite sure it's not a problem with the mail function. It's probably
the reverse dns configuration on your SMTP/sendmail server. AOL 
Verizon have been two real sticklers for that.
If you know the IP address that your server is sending the email from
you can use this:
http://www.dnsstuff.com/tools/ptr.ch?ip=YOURIPADDRESS
To check the revers dns resolution. You may be surprised.
 Ryan 

-Original Message-
From: Manuel Lemos [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 18, 2004 10:28 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: mail() function and AOL users

Hello,
On 12/12/2003 04:34 AM, Matt Perry wrote:
 

I use the following php mail function in an online applicaiton
   

program:
 

mail($email, application submitted, $message, From: 
[EMAIL PROTECTED]);

This function does not always work when I modify $message.  I have 
checked for null values for $message already but this does not seem to
   

 

be the problem.
I am trying to develop some sort of pattern of when this function 
works and when it does not.
The only essential difference between the values I pass in for message
   

 

is the one that does not always work includes a link.  Apparently 
anyone useing AOL email is particularly vulnerable to this problem.

Is it likely that AOL and other mail servers sometimes block any email
   

 

from a web site if it has a link in the main body?  Or should I not be
   

 

useing mail() in this manner to begin with?
   

Maybe you are not generating the message headers and body properly. 
Without seeing the code that you use to define $message, it is hard to
tell.

I just suggest that you try this class to properly compose and send your
messages:
http://www.phpclasses.org/mimemessage
 

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


[PHP-DB] Re: search engine query

2004-05-19 Thread Torsten Roehr
Bobo Wieland [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi! I'm new to this list. I usually try to get my answers at the php-win
 mailing list...

 But since this is a mysql question I thought it would be better to ask i t
 here;

 How do I get the best result from a simple search (just one input box and
a
 search button) from a mysql db with two tables containing
 the following fields;

 _table1_
 id (int) (primary)
 title (varchar 40)
 keywords (varchar 255 with a list of keywords separated with comma)
 description (varchar 255 with fulltext index)
 -

 _table2_
 f_key (int), page (int) (f_key is the same as id from table1 and f_key and
 page combined is the primary)
 text (text with fulltext index)
 -


 I guess you can see what the table represents... One article split in 1 to
*
 pages with one entry in table1 for all the common stuff...

 I need to find the articles that fits the search the best
(obviously... )...
 I'm really not sure how to do this... There must be some general way that
 people goes about this since it seems to me to be a quite common thing to
 do...

Take alook here:
http://dev.mysql.com/doc/mysql/en/Fulltext_Search.html

Hope this helps.

Regards, Torsten

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



[PHP-DB] Re: Slow php-mysql

2004-05-19 Thread PHPDiscuss - PHP Newsgroups and mailing lists
Hi Dez,

I think I got exactly the same problem. I have W2003 Advanced Server
running with IIS 6 and PHP 4.3.4. On a nother machine I have MySQL
4.1.0-alpha-nt. Now any connection from any other host in the network
(e.g. running phpMyAdmin) to the DB works just fine (hosts running IIS or
Apache). But from this one IIS server it takes about 7 seconds to come up
with the first connection. every other following connection in the same
script works just fine and fast. Except if I use the new connection flag
in the mysql_connect, then it takes 7 seconds per query. 

This is almost driving me nuts, as I just don`t know where to look
anymore! Have you found a solution?


Drez wrote:

 Hi all,
 I recently change my apche, php mysql server for a better one. I 
 installed all the same versions of software on the new server (except 
 for php which was 4.36 RC2). I have apache 1.3 + mysql 3.23.58 + php 
 4.36. Im on a WinXp Pro os. I copy the exact config for the my.ini, 
 httpd.conf and php.ini files. The result is unfortunatly a very slow 
 application.
 For exemple, it takes 5-10 secoonds to phpMyAdmin to load after the 
 login, but when a do a big query, with the query interface, it clocks 
 under 1 second.
 I thought It was the php then, but a big while loop took not much time 
 then normal to print out.
 Then maybe the apache, but page containing only HTML print well.
 I try to put a connection and disconnection in the While loop and it 
 slow down all the process.
 With this little test I thing that it come from MySql. I try some 
 setting like output_buffering without result.
 If someone can help me identify for sure the guilty process with some 
 test a can't imagine myself
 Thanks, and sorry for my bad english I do my best!
 Drez

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



[PHP-DB] Re: mail() function and AOL users

2004-05-19 Thread Justin Patrin
Matt Perry wrote:
I use the following php mail function in an online applicaiton program:
mail($email, application submitted, $message, From: 
[EMAIL PROTECTED]);

This function does not always work when I modify $message.  I have 
checked for null values for $message already but this does not seem to 
be the problem.
I am trying to develop some sort of pattern of when this function works 
and when it does not.
The only essential difference between the values I pass in for message 
is the one that does not always work includes a link.  Apparently anyone 
useing AOL email is particularly vulnerable to this problem.

Is it likely that AOL and other mail servers sometimes block any email 
from a web site if it has a link in the main body?  Or should I not be 
useing mail() in this manner to begin with?

-Matt
Are you doing this on your own server? If so, your problem is likely due 
to AOL blocking dynamic IPs from sending e-mail to them. Even if this is 
a real server, you could still have these problems. Are you getting 
bounces back?

The solution is to route all of your e-mails through a trusted mail 
server, such as that of your ISP. You can use a mailing package which 
sends the mail to a mail server (instead of sending it locally). One 
such is PEAR's Mail package. Use the smtp backend. You can also do this 
on your server. If you need more help with this, mail me off-list.

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


[PHP-DB] PHP based telco billing/accounting software

2004-05-19 Thread Aaron Wolski
[OT]

Hi all,

I have a client who needs to implement telephone billing/account
software for their clients.

They're looking to have us develop a customize solution for them.
However, I thought I'd check here and see if anyone knows of software
(opensource or paid) that they could recommend me checking out to
present to them as an alternative option.

Any ideas?

Thanks and my apologies for the OT post. Although, they would like it to
be PHP based ;)

Aaron

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



[PHP-DB] PHP / MySQL Developer

2004-05-19 Thread Kenny
Hi All,
 
This is just a request to all you programmers out there,
 
I have been programming using PHP/MySql for approx 5 years now.
I was involved in a motor car accident last year October and I broke my
back in 3 places, this has left me paralyzed from the waist down but
luckily my I can still code.
 
What I am looking for is any freelance work that you may be able to
throw my way
 
I am prepared to do anything 
 
Please mail me
 
Regards
 
Kenny
[EMAIL PROTECTED]
 


[PHP-DB] Re: Subject: SQL Statement

2004-05-19 Thread Neil Smith [MVP, Digital media]
You're missing a closing quote at the end of the line, following the group 
by `calls`, it should end as

, `calls`;
Since you are passing a string to PHP to hand off to the DB engine. Also, 
PHP function mysql_error($connection) is useful as this will return any 
errors generated by your database (if present).

Cheers - Neil
At 00:57 19/05/2004 +, you wrote:
$sqlwrk .=  WHERE (`pk_phone_number` =  . $fk_phone”) AND 
(`date` BETWEEN “'$my_startdate'” AND “'$my_enddate'”)”;
$sqlwrk .=  GROUP BY `pk_phone_reports`, `fk_ph_num`, `date`, `calls`;


CaptionKit http://www.captionkit.com : Production tools
for accessible subtitled internet media, transcripts
and searchable video. Supports Real Player, Quicktime
and Windows Media Player.
VideoChat with friends online, get Freshly Toasted every
day at http://www.fresh-toast.net : NetMeeting solutions
for a connected world.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: MySQL to DBF

2004-05-19 Thread Torsten Roehr
Emilio Alvarado [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I need to make a dbf file with some mysql records
 The creation of the dbf with the dbase_create works FINE
 Now I need to fill the dbf, I have a mysql database with some of the data,
I
 have the apropiate SQL to view that data but I need to make an array with
 that data and some , 0.
 How can i do this

 Thanks

$result = mysql_query('SELECT ...');

// open your DBF
$dbf = dbase_open($filename, 2);

// get each row as an array
while ($row = mysql_fetch_row($result)) {
// now insert the row into your DBF, $dbf is your identifier from the
open command
db_add_record($dbf, $row);
}

Haven't tested it, though. Take a look at the manual page. There are some
user comments that might help you:
http://de.php.net/manual/en/function.dbase-add-record.php


Regards, Torsten

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



[PHP-DB] MySQL to DBF

2004-05-19 Thread Emilio Alvarado
I need to make a dbf file with some mysql records
The creation of the dbf with the dbase_create works FINE
Now I need to fill the dbf, I have a mysql database with some of the data, I
have the apropiate SQL to view that data but I need to make an array with
that data and some , 0.
How can i do this

Thanks

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



[PHP-DB] MySQLi set_ssl method arguments

2004-05-19 Thread TJ Root
I was wondering if anyone could shed some light on what an appropriate set
of arguments would look like for the ssl_set method on a MySQLi object.  I
am trying to connect to an SSL-enabled MySQL server without much luck.  I am
confident that I am passing the certificate paths correctly, but once I get
to the capath and and cipher list I am not sure what I need to be passing
exactly.

Here is what I have so far (works fine non-ssl)

$mysqlconn = mysqli_init();

//I put all the keys and certificates in the same folder as the script for
simplicity while testing.
//As I stated, I am unsure about the last 2 arguments.

$mysqlconn-ssl_set( 'client_key.pem', 'client_cert.pem', 'cacert.pem',
'./', 'X509' );

$mysqlconn-real_connect( 'databasehost.domainname.com', 'user', 'pass',
'dbaasename' );

Any help is greatly appreciated

-TJ

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



[PHP-DB] sybase_set_message_handler not defined.

2004-05-19 Thread John Mund
Hello,
   I have set up php 4.3.6 with sybase support (running on apache 
2.0.49 on solaris 8).  I am able to connect to my sybase 11.9.2 server, 
log on and do queries.  However when I try to set up a message handler 
with the sybase_set_message_handler() function I get the following error 
message:

*Fatal error*: Call to undefined function: sybase_set_message_handler()
I copied and pasted the examples straight from the documentation but 
cannot seem to get this to work.  I've likely missed something in the 
configuration but have no idea where to look.  Does anybody have any 
suggestions?

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


[PHP-DB] Am I missing something? Why doesn't php have a 'date' variable type?

2004-05-19 Thread Ross Honniball
Hello.
I've been using php for about 5 months now. One of the first things I 
noticed it was missing was a standard in-built manner of handling dates. I 
assumed that, being inexperienced, I was probably missing something and in 
time all would become clear.

It's a while later now and I still think it sucks that it doesn't have a 
standard date variable type.

Why doesn't it have a standard class or variable type to help process dates 
in a standard manner?

Php should offer a DATE variable type (in addition to string, int, array, 
object etc.).

Dates could be stored by utilising standard date functions. eg.
  $birthday = SetDate('23-07-1985', 'dmy');
Use of this function would effectively declare $birthday as a field of type 
date. (note that I wish this was my birthday).

Standard maths could be performed on date fields for comparison. eg.
  $newdate = $start_date + $birthdate - 5; // as in days
  if ($date1  $date2) ..whatever..;
And of course standard routines for formating dates, standard routines for 
showing time between dates / times etc.

This frustrated me so much that I recently wrote a class to emulate, as 
best as possible, this level of functionality, which would actually be 
quite adequate if Windows didn't suck. But due to some lunatic Windows 
limitation, it will only work on dates between 1970 and 2038. Hmmm. Nice 
one, Bill (are we in for another 'new millenium' problem on windows 
machines in 2038?).

Anyway, am I missing something, or do other people find this a glaring 
omission in an otherwise spiffing product?

Ross
PS note that in refering to dates above, I really mean date + time.
PSS Technical note:
As you all know, internally the only rational way to store dates is as a 
sequential number from an chosen starting date - eg. 1-1-1960, 1-1-1970, 
whatever. Prior dates are simply stored as negative numbers.
.
. Ross Honniball. JCU Bookshop Cairns, Qld, Australia.
.

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