Re: [PHP-DB] Database question

2002-08-21 Thread Ignatius Reilly
A really good starting-level textbook is Fabian Pascal's Practical issues in database management. My warm recommendation. It will give you a decent theoretical understanding as well as helping you designing your DB in order to avoid the most usual design mistakes. You will find there VERY

[PHP-DB] date comparison

2002-08-21 Thread Smita Manohar
hello, in my script i want to compare input date with date stored in database and want the result for date = input date and sometime for date = input date. it didn't work for = and = operators. i also tried using between but it didn't give desire result :-( is there any other comparison

[PHP-DB] time slots and PHP/MySQL

2002-08-21 Thread Matthew Crouch
this is a big question and i'm not trying to get you to do my modelling for me, but if anyone has experience with this i'd appreciate being pointed in the right direction: How could one efficiently manage time slots in a dB? I mean for example telling the dB that Mike can be somewhere at 6:15

[PHP-DB] Re: time slots and PHP/MySQL

2002-08-21 Thread l0t3k
Matthew, you may want to investigate MRBS (Meeting Room Booking System). it handles such things for resource allocation. i dont know where the project location is, but google is your friend Matthew Crouch [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

[PHP-DB] Are running sessions using a MySQL handler faster?

2002-08-21 Thread Jonathan Thomas
Good afternoon! Quick performance question - I'm currently preparing the release of a new website running on a Linux box written in PHP and MySQL with sessions throughout. I've read a bit about changing the PHP session handler to use a database vs. the flat file method. Does anyone have

Re: [PHP-DB] date comparison

2002-08-21 Thread Jason Wong
On Wednesday 21 August 2002 21:28, Smita Manohar wrote: hello, in my script i want to compare input date with date stored in database and want the result for date = input date and sometime for date = input date. How is the date stored? What type of field? it didn't work for = and =

Re: [PHP-DB] Are running sessions using a MySQL handler faster?

2002-08-21 Thread Rasmus Lerdorf
Chances are the files-based one is probably a bit quicker. Especially on systems where /tmp is optimized or perhaps even set up as a ramdisk. -Rasmus On Wed, 21 Aug 2002, Jonathan Thomas wrote: Good afternoon! Quick performance question - I'm currently preparing the release of a new

Re: [PHP-DB] time slots and PHP/MySQL

2002-08-21 Thread Miles Thompson
Don't want to get too philosophical, but don't PIM/Contact Management projects like TWIG have a feature like this? Now, this is just off the top of my head, but rather than create a timeslots table, wouldn't you have an event table, and a member_booked table? The minimum fields in event

Re: [PHP-DB] keeping form field data when reloading a form

2002-08-21 Thread chip . wiegand
Thanks, that works great. -- Chip Stuart McDonald [EMAIL PROTECTED] wrote on 08/20/2002 05:55:40 PM: Are you setting the variables in the form? Something like this - note the value field in the username field: form method=post action=index.php name=loginuser table summary=layout table

[PHP-DB] Printing?

2002-08-21 Thread James Hatridge
Hi all... I'm useing SuSE 8.0, mysql, and PHP with a HP L5 printer. Could someone give me a hint on how to print a form to my HP? What I want to do is print (on paper G) monthly customer statements. Thanks JIM -- Jim Hatridge Linux User #88484

[PHP-DB] Charts...

2002-08-21 Thread James Hatridge
Hi all.. I'm using SuSE 8.0, mysql, and PHP4. Is it possible to make charts with a database? If so, how about a hint on it? Thanks JIM -- Jim Hatridge Linux User #88484 -- BayerWulf Linux System # 129656

Re: [PHP-DB] Can't get data back into the database

2002-08-21 Thread Patrick Kirk
contacts.php appears to have been chewed up ... fresh copy. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Charts...

2002-08-21 Thread Jason Wong
On Thursday 22 August 2002 02:01, James Hatridge wrote: Hi all.. I'm using SuSE 8.0, mysql, and PHP4. Is it possible to make charts with a database? If so, how about a hint on it? Easiest way is to use an existing class: jpgraph or search on www.phpclasses.org -- Jason Wong - Gremlins

[PHP-DB] form validation question - regex not working

2002-08-21 Thread chip . wiegand
I hope this isn't too far off topic - I have a regex for validating email addresses - if (empty($useremail) || !eregi(^([A-Za-z0-9\.\_-])+@([A-Za-z0-9\_-])+\. ([A-Za-z]{2,3})+$, $useremail)) Notice the {2,3} which is supposed to limit the last part to 2 or 3 letters, but I have been testing

Re: [PHP-DB] Can't get data back into the database

2002-08-21 Thread Patrick Kirk
Patrick Kirk said: Good Lord - its eaten contacts.php again! ?php /* Setup connection if ($grouping) // called as contacts.php?grouping?=blah // print table with group members elseif ($lastname) // called as contacts.php?lastname starts with blah // print table of suitable last names elseif

Re: [PHP-DB] form validation question - regex not working

2002-08-21 Thread DL Neil
Chip, It's not so much off topic as a perennial topic - see archives and many tutorial articles. When you've worked out the answer to this question, please try out your algorithm on my (or any other 'foreign') address. Then consider the imminent introduction of further TLDs, eg .info (four

Re: [PHP-DB] form validation question - regex not working

2002-08-21 Thread Jason Wong
On Thursday 22 August 2002 00:29, [EMAIL PROTECTED] wrote: I hope this isn't too far off topic - I have a regex for validating email addresses - if (empty($useremail) || !eregi(^([A-Za-z0-9\.\_-])+@([A-Za-z0-9\_-])+\. ([A-Za-z]{2,3})+$, $useremail)) Notice the {2,3} which is supposed to

Re: [PHP-DB] Charts...

2002-08-21 Thread Ignatius Reilly
AFAI, to make really nice, Excel-style, dynamical charts, the best way is to export your MySQL data into a SVG string (a XML document), which can be viewed directly by the client browser (at least with IE5+) Someday MySQL will have a SELECT ... OUTPUT XML capability... I am currently looking

Re: [PHP-DB] form validation question - regex not working

2002-08-21 Thread DL Neil
Jason, Concur with your advice, but was also amused by its juxtaposition with your sig file philosophy... =dn [snipped] I have a regex for validating email addresses - You're strongly advised not to write your own regex for validating email /* The most important things, each person must

[PHP-DB] Date Subtraction

2002-08-21 Thread Manoj Japher
hi, Is there any way I can get previous day's date, like we get current date by using getdate() or date() function. I mean is there some in-built function in PHP which can subtract date to give me yesterday's date. I am currently calculating it using some code, which I have written and it

RE: [PHP-DB] Date Subtraction

2002-08-21 Thread Hutchins, Richard
Manoj, Just a couple of thoughts: First, I know this particular topic has been discussed here recently, so you might want to search the archives for more exhaustive information. Second, if you're using MySQL, check out the functions DATE_ADD() and MOD(). They're MySQL functions, so you'll have

[PHP-DB] gd Library config problem.......

2002-08-21 Thread Dan Kelly
Anyone know how to configure gd library (php4)? I uploaded PHP_INFO and this is what I got ~~~ './configure' '--with-apxs=apxs' '--prefix=/home/builder/psa-patch/psa/apache/../release/usr/local/psa/apache' '--with-system-regex'

[PHP-DB] Re: Charts...

2002-08-21 Thread Dan Koken
James. Many times I find myself wanting a quick and dirty bar chart using only HTML. You can do this simply by creating a one pixel image in any color you like. That way the download is only 1 pixel. Then calculate the width or height depending on if you want vertical or horizontal bars by

Re: [PHP-DB] form validation question - regex not working

2002-08-21 Thread chip . wiegand
Jason Wong [EMAIL PROTECTED] wrote on 08/21/2002 10:00:23 AM: On Thursday 22 August 2002 00:29, [EMAIL PROTECTED] wrote: I hope this isn't too far off topic - I have a regex for validating email addresses - if (empty($useremail) || !eregi(^([A-Za-z0-9\.\_-])+@([A-Za-z0-9\_-]) +\.

Re: [PHP-DB] Date Subtraction

2002-08-21 Thread Jason Wong
On Thursday 22 August 2002 02:23, Manoj Japher wrote: hi, Is there any way I can get previous day's date, like we get current date by using getdate() or date() function. I mean is there some in-built function in PHP which can subtract date to give me yesterday's date. I am currently

RE: [PHP-DB] Date Subtraction

2002-08-21 Thread Hutchins, Richard
Oh, in MySQL, there's also DATE_SUB(). Forgot to mention that one. Rich -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 21, 2002 2:40 PM To: 'Manoj Japher'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Date Subtraction Manoj, Just a couple of

Re: Re: [PHP-DB] Date Subtraction

2002-08-21 Thread Manoj Japher
hi, hey you are bang on target. It did solve my problem. Thanks a lot, Manoj On Wed, 21 Aug 2002 [EMAIL PROTECTED] wrote : if you really just want yesterday, i use date(Y-m-d, time() - 86400); that way you'll get the correct info, no matter if it spans weeks, months, years etc i

RE: [PHP-DB] Re: problem with php and unixODBC

2002-08-21 Thread Andrew Hill
Marten, Look at the output of a phpinfo() when you have the putenv()'s - you can see that there are a couple of different environments here. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Virtuoso Universal Server

Re: [PHP-DB] form validation question - regex not working

2002-08-21 Thread Jason Wong
On Thursday 22 August 2002 02:54, [EMAIL PROTECTED] wrote: This is from a php/mysql book. If they're presenting it as something that you can use in your real-life code then you should look carefully at all the other code in the book to see whether they're all as sloppy. On the other hand if

Re: [PHP-DB] form validation question - regex not working

2002-08-21 Thread Pierre-Alain Joye
On Thu, 22 Aug 2002 03:10:02 +0800 Jason Wong [EMAIL PROTECTED] wrote: On Thursday 22 August 2002 02:54, [EMAIL PROTECTED] wrote: As you can see, the list address ([EMAIL PROTECTED]), and my address ([EMAIL PROTECTED]) would be treated as invalid. Not very clever is it? Well, anyway there

Re: [PHP-DB] form validation question - regex not working

2002-08-21 Thread chip . wiegand
Jason Wong [EMAIL PROTECTED] wrote on 08/21/2002 12:10:02 PM: It's only checking for addresses of the form [EMAIL PROTECTED] As you can see, the list address ([EMAIL PROTECTED]), and my address ([EMAIL PROTECTED]) would be treated as invalid. Not very clever is it? Got it figured out, and

Re: [PHP-DB] form validation question - regex not working

2002-08-21 Thread DL Neil
Regarding the good sense or otherwise for checking email addresses: This is from a php/mysql book... If it was from page 115, then please turn over to page 116! Regards, =dn -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] form validation question - regex not working

2002-08-21 Thread DL Neil
Regarding the problem you are actually asking about: if (empty($useremail) || !eregi(^([A-Za-z0-9\.\_-])+([A-Za-z0-9\_-]) +\. ([A-Za-z]{2,3})+$, $useremail)) Notice the {2,3} which is supposed to limit the last part to 2 or 3 letters, but I have been testing this and it allows as

Re: [PHP-DB] form validation question - regex not working

2002-08-21 Thread Ignatius Reilly
There is this cute suggestion in the Wrox PHP book: /^.+@.+\\..+$/ Looks like a puzzle, but it works (almost) always. Enjoy Ignatius Reilly - Original Message - From: DL Neil To: [EMAIL

[PHP-DB] Re: gd Library config problem.......

2002-08-21 Thread Joni Järvinen
Try asking in php.general. I use debian so it was easy for me to setup my PHP4 with all I needed :) -Joni- -- // Joni Järvinen // [EMAIL PROTECTED] // http://www.reactorbox.org/~wandu Dan Kelly [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Anyone know how to

[PHP-DB] Re: Date Subtraction

2002-08-21 Thread Adam Royle
Use getdate() with mktime() and this is your solution. http://www.php.net/manual/en/function.getdate.php http://www.php.net/manual/en/function.mktime.php Adam

RE: [PHP-DB] Date Subtraction

2002-08-21 Thread Ryan Jameson (USA)
What's more you can do some neat stuff with manipulating the timestamp to create very quick and accurate calendars. For instance for an application I had to build I had need of highlighting weeks on a calendar to change colors every two weeks, but any given day needed to know which color it

Re: [PHP-DB] form validation question - regex not working

2002-08-21 Thread Jason Wong
On Thursday 22 August 2002 04:01, [EMAIL PROTECTED] wrote: Got it figured out, and foreign address do work now - if (empty($useremail) || !eregi(^([A-Za-z0-9\.\_-])+@([A-Za-z0-9\_-])+\.([A-Za-z])+\.([a-z])*$, $useremail)) What do you mean by 'foreign' addresses? The above will still fail

[PHP-DB] MySQL and BLOB

2002-08-21 Thread Andy
Hi there, I am storing via PHP pictures into BLOB fields. Worked fine so far for over 200 images. Now an error has occured with a particular picture. No error msg. Just does not work. The wired thing is that the thumbnail does. So I guess the BLOB field is just to small for the image. How many

Re: [PHP-DB] MySQL and BLOB

2002-08-21 Thread Jason Wong
On Thursday 22 August 2002 13:57, Andy wrote: Hi there, I am storing via PHP pictures into BLOB fields. Worked fine so far for over 200 images. Now an error has occured with a particular picture. No error msg. Just does not work. The wired thing is that the thumbnail does. So I guess the