RE: [PHP-DB] Implementing search in a database driven website

2004-10-27 Thread Graham Cossey
I found this PDF 'quick reference' quite useful as I am just starting to
learn how to use regular expressions.

http://www.erudil.com/pdf/preqr.pdf

HTH
Graham

 -Original Message-
 From: Vinayakam Murugan [mailto:[EMAIL PROTECTED]
 Sent: 27 October 2004 04:11
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] Implementing search in a database driven website


 Thanks, Robby. This worked. However I wasn't able to get any
 documentation on the siU parameters used in the command as in

  $string= preg_replace('style[^]*.*/style'siU,'',$string);

 Any pointers.



 --
 Warm Regards
 
 Vinayak

 --
 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] MySQL backup software

2004-10-27 Thread Perry, Matthew (Fire Marshal's Office)
Does anyone know a free MySQL backup program to schedule regular backups?



Re: [PHP-DB] MySQL backup software

2004-10-27 Thread Jason Wong
On Wednesday 27 October 2004 13:57, Perry, Matthew (Fire Marshal's Office) 
wrote:
 Does anyone know a free MySQL backup program to schedule regular backups?

  www.mysql.com

  google  mysql mailing list

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
--
/*
Sigh.  I like to think it's just the Linux people who want to be on
the leading edge so bad they walk right off the precipice.
(Craig E. Groeschel)
*/

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



RE: [PHP-DB] MySQL backup software

2004-10-27 Thread Norland, Martin
You were on the right track with mysqldump.  Windows doesn't have a
direct cron equivalent - but it does have the ability to schedule tasks.
Write a short batch file or equivalent (you should be able to whip one
together in no time with a little googling) and schedule it to run.

I doubt you'll find a tool that does exactly what you want that's any
more advanced or configurable - there's just no need.  That said - who
knows, people make all kinds of software to fill what others perceive as
unneeded.

Cheers,
- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.


-Original Message-
From: Perry, Matthew (Fire Marshal's Office)
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 27, 2004 8:58 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL backup software


Does anyone know a free MySQL backup program to schedule regular
backups?

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



[PHP-DB] Re: MySQL backup software

2004-10-27 Thread pete M
Matthew Perry wrote:
Does anyone know a free MySQL backup program to schedule regular backups?

This is the script I use - its wicked cos it can ftp and email backups 
as well
http://worldcommunity.com/opensource/utilities/mysql_backup.html

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


[PHP-DB] Date Question

2004-10-27 Thread Bomgardner, Mark A
I am having trouble converting a date from mm/dd/ to -mm-dd on a
user form.  I know there was post about this, but I keep getting an
error message when I try to search the archives.

 

I have looked at the manual, but I am not finding what I am looking for.

 

Mark A. Bomgardner 
Technology Specialist 
KLETC 

 



RE: [PHP-DB] Date Question

2004-10-27 Thread Bastien Koert
How are you trying to convert the date?
bastien

From: Bomgardner, Mark A [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Date Question
Date: Wed, 27 Oct 2004 11:17:16 -0500
I am having trouble converting a date from mm/dd/ to -mm-dd on a
user form.  I know there was post about this, but I keep getting an
error message when I try to search the archives.

I have looked at the manual, but I am not finding what I am looking for.

Mark A. Bomgardner
Technology Specialist
KLETC

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


[PHP-DB] Re: php_mysql.dll fails to load

2004-10-27 Thread Jose Stefan
It appears as if the php_mysql.dll  module has problems loading the
libmysql.dll file.
Setting the PHP dir to the system path var did NOT work for me.

However, these options did:
a) copy the bundled libmysql.dll to the windows system32 folder.
b) OR, copy the bundled libmysql.dll to apache's BIN folder.
c) OR, copy the bundled libmysql.dll to apache's root folder.

I'm currently using option C, but I would prefer not having to copy DLL
files across my system. Has anyone found a better solution?

My Server:
* Microsoft WindowsXP SP2
* MySQL 4.0.21
* Apache 2.0.52
* PHP 5.0.2

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



[PHP-DB] Re: php_mysql.dll fails to load

2004-10-27 Thread Jose Stefan
It appears as if the php_mysql.dll  module has problems loading the
libmysql.dll file.
Setting the PHP dir to the system %path% var did NOT work for me.

However, these options did:
a) copy the bundled libmysql.dll to the windows system32 folder.
b) OR, copy the bundled libmysql.dll to apache's BIN folder.
c) OR, copy the bundled libmysql.dll to apache's root folder.

I'm currently using option C, but I would prefer not having to copy DLL
files across my system. Has anyone found a better solution?

My Server Includes:
* Microsoft WindowsXP SP2
* MySQL 4.0.21
* Apache 2.0.52
* PHP 5.0.2

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



Re: [PHP-DB] Date Question

2004-10-27 Thread John Holmes
Bomgardner, Mark A wrote:
I am having trouble converting a date from mm/dd/ to -mm-dd on a
user form.  I know there was post about this, but I keep getting an
error message when I try to search the archives.
I have looked at the manual, but I am not finding what I am looking for.
echo date('Y-m-d',strtotime('09/24/2004'));
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals  www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] More help with restore server

2004-10-27 Thread Michael Cortes

I just seem to be full of it, questions these days.

Here is another situation I find myself in.  I did a rm -rf /var/*   Yeah, 
yeah I know.  So getting beyond the oops factor, I have been recreating the 
server.  

I installed a new harddrive as /dev/hdd0.  I installed the old harddrive as 
hdd1.  I did a new installation of 7.3 on hdd0 and copied the old /home and 
/etc to hdd0.  

I will be upgrading to newer versions of rh and then probably migrating to fc2 
or white box linux.

For now, I wanted to recover my machine to it's previous state.  It is our 
DNS, email and web server.

I have the email server back, the dns back, am working on the web site.  I was 
just  finishing up and restoring a php/mysql calendar and I got an error 
call to undefined function: mysql_connect()

I googled and it seemed to suggest I needed some updates or php or mysql 
packages installed.

I then d/l'ed from ftp.redhat.com/pub/redhat/linux/updates/7.3/en/os/i386/ 
(which i assume are the last updates for 7.3) to hdd1 and I just tried to rpm 
-U mysql* and php* 

I get dependency errors like  php = 4.1.2-7.3.6 is needed bye 
php-imap-4.1.2-7.3.6

so i rpm -U php-4.1.2-7.3.6.i386.rpm and I get package php-devel-4.1.2-7.3.6 
is already installed

so I rpm -q php and i get php-4.1.2-7

Something seems obviously wrong.  I f anyone has ideas, I would welcome them.





-- 

Michael Cortes
Fort LeBoeuf School District
34 East Ninth Street
PO Box 810
Waterford PA 16441-0810
814.796.4795

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



RE: [PHP-DB] More help with restore server

2004-10-27 Thread Norland, Martin
Without thorough investigation, I can't be sure - but it looks like you
have a packaged development version (e.g. cvs or for compiling libraries
against) of php installed, and it's conflicting with allowing a
non-development version.  You would probably be best served by actually
looking at the available packages and installing the ones you want,
instead of attempting to install php*.  (or anything * for that matter)

Just my $0.03 (tax is killer these days!)

- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.


-Original Message-
From: Michael Cortes [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 27, 2004 1:43 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-DB] More help with restore server



I just seem to be full of it, questions these days.

Here is another situation I find myself in.  I did a rm -rf /var/*
Yeah, 
yeah I know.  So getting beyond the oops factor, I have been recreating
the 
server.  

I installed a new harddrive as /dev/hdd0.  I installed the old harddrive
as 
hdd1.  I did a new installation of 7.3 on hdd0 and copied the old /home
and 
/etc to hdd0.  

I will be upgrading to newer versions of rh and then probably migrating
to fc2 
or white box linux.

For now, I wanted to recover my machine to it's previous state.  It is
our 
DNS, email and web server.

I have the email server back, the dns back, am working on the web site.
I was 
just  finishing up and restoring a php/mysql calendar and I got an error

call to undefined function: mysql_connect()

I googled and it seemed to suggest I needed some updates or php or mysql

packages installed.

I then d/l'ed from
ftp.redhat.com/pub/redhat/linux/updates/7.3/en/os/i386/ 
(which i assume are the last updates for 7.3) to hdd1 and I just tried
to rpm 
-U mysql* and php* 

I get dependency errors like  php = 4.1.2-7.3.6 is needed bye 
php-imap-4.1.2-7.3.6

so i rpm -U php-4.1.2-7.3.6.i386.rpm and I get package
php-devel-4.1.2-7.3.6 
is already installed

so I rpm -q php and i get php-4.1.2-7

Something seems obviously wrong.  I f anyone has ideas, I would welcome
them.





-- 

Michael Cortes
Fort LeBoeuf School District
34 East Ninth Street
PO Box 810
Waterford PA 16441-0810
814.796.4795

-- 
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: MySQL backup software

2004-10-27 Thread Frank Flynn
There must be a dozen solutions here; mysqldump and cron come to mind 
but you haven't been very specific with your needs.

Is your database server  Windows or Unix?  Can you write a simple 
script (or modify an example) to fit your needs?  What are you going to 
back up to?  Another server? Tape?  A different disk on your server?  
The same disk? (bad idea on so many levels).

Why are you backing up?  Disaster recovery?  History? Data integrity?  
How big is the DB(s)?  How often to you intend to back up?  Or if you 
did crash and burn and had to go back to a back up how much data (how 
long) could you tolerate loosing?

It's a kind of interesting discussion and the only wrong answers are 
not to back up and perhaps to back up to the same disk if you want to 
be able to recover.  But if you answer these questions we'll give you 
some options.

Frank
On Oct 27, 2004, at 6:57 AM, Perry, Matthew (Fire Marshal's Office) 
[EMAIL PROTECTED]t wrote:

From: Perry, Matthew (Fire Marshal's Office) 
[EMAIL PROTECTED]
Date: October 27, 2004 6:57:57 AM PDT
To: [EMAIL PROTECTED]
Subject: MySQL backup software

Does anyone know a free MySQL backup program to schedule regular 
backups?



[PHP-DB] Finding the highest number in a column?

2004-10-27 Thread Chris Payne
Hi there everyone,

 

I am working with a very complex system where not all numbers are assigned
1, 2, 3  etc  so there could be a row with the number 1 and then the
next row could be 40 and so on 

 

Is there a way with PHP and MySQL to find out what the highest number is in
a particular column easily when the numbers are auto-incremented so arent
necessarily one after the other?

 

I would really appreciate any help on this as its really bugging me.

 

Chris


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.783 / Virus Database: 529 - Release Date: 10/25/2004
 


[PHP-DB] Re: Finding the highest number in a column?

2004-10-27 Thread David Robley
On Thu, 28 Oct 2004 13:03, Chris Payne wrote:

 Hi there everyone,
 
  
 
 I am working with a very complex system where not all numbers are assigned
 1, 2, 3 ?? etc ?? so there could be a row with the number 1 and then the
 next row could be 40 and so on ??
 
  
 
 Is there a way with PHP and MySQL to find out what the highest number is
 in a particular column easily when the numbers are auto-incremented so
 aren?t necessarily one after the other?
 
  
 
 I would really appreciate any help on this as it?s really bugging me.
 
  
 
 Chris

Does SELECT MAX(column) do what you want?

-- 
David Robley

Me know gammar. Me cood use it gud.

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



Re: [PHP-DB] Finding the highest number in a column?

2004-10-27 Thread Robby Russell
On Wed, 2004-10-27 at 23:33 -0400, Chris Payne wrote:
 Hi there everyone,
 
  
 
 I am working with a very complex system where not all numbers are assigned
 1, 2, 3  etc  so there could be a row with the number 1 and then the
 next row could be 40 and so on 
 
  
 
 Is there a way with PHP and MySQL to find out what the highest number is in
 a particular column easily when the numbers are auto-incremented so arent
 necessarily one after the other?

SELECT * FROM table ORDER BY colname DESC LIMIT 1; 

?

assuming all your column values are unique... 

-Robby

-- 
/***
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting  Development
* --- Now supporting PHP5 and PHP4 ---
/


signature.asc
Description: This is a digitally signed message part


Re: [PHP-DB] Finding the highest number in a column?

2004-10-27 Thread Robby Russell
On Wed, 2004-10-27 at 20:46 -0700, Robby Russell wrote:
 On Wed, 2004-10-27 at 23:33 -0400, Chris Payne wrote:
  Hi there everyone,
  
   
  
  I am working with a very complex system where not all numbers are assigned
  1, 2, 3  etc  so there could be a row with the number 1 and then the
  next row could be 40 and so on 
  
   
  
  Is there a way with PHP and MySQL to find out what the highest number is in
  a particular column easily when the numbers are auto-incremented so arent
  necessarily one after the other?
 
 SELECT * FROM table ORDER BY colname DESC LIMIT 1; 
 
 ?
 

oops, you're looking for the max() now the whole row.

MAX() should work for you..

-Robby


-- 
/***
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting  Development
* --- Now supporting PHP5 and PHP4 ---
/


signature.asc
Description: This is a digitally signed message part


[PHP-DB] Re: I can't seem to get Max() to work

2004-10-27 Thread David Robley
On Thu, 28 Oct 2004 14:35, Chris Payne wrote:

 Hi there everyone,
 
  
 
 I can?t seem to get the below to work with PHP and MySQL:
 
  
 
 $sql = SELECT MAX(FoodItemNumber) FROM menuitemsubs;
 
  
 
 What am I doing wrong?  I need the highest number from the column
 FoodItemNumber, but it doesn?t return anything unless I change the MAX()
 to a * and I don?t want that I need it to be the MAX() number as it isn?t
 an auto-increment field.

Works a treat for me; au_linkid is a smallint which is not autoincrement, nd
not indexed at all.

mysql select max(au_linkid) from categ_link;
++
| max(au_linkid) |
++
|540 |
++
1 row in set (0.03 sec)

FoodItemNumber is an integer type?

-- 
David Robley

I Have To Stop Now, My Fingers Are Getting Hoarse!

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



[PHP-DB] I can't seem to get Max() to work

2004-10-27 Thread Chris Payne
Hi there everyone,

 

I cant seem to get the below to work with PHP and MySQL:

 

$sql = SELECT MAX(FoodItemNumber) FROM menuitemsubs;

 

What am I doing wrong?  I need the highest number from the column
FoodItemNumber, but it doesnt return anything unless I change the MAX() to
a * and I dont want that I need it to be the MAX() number as it isnt an
auto-increment field.

 

Chris


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.783 / Virus Database: 529 - Release Date: 10/25/2004