[PHP-DB] Delete from mysql table is there a way to....

2002-04-14 Thread Jennifer Downey

Hi all,
I'm not sure if my first post showed up so I am going to post it again and I
apologize if it shows up twice.

Is there a way to delete a record from a mysql table without fragmenting the
db?

Here is the query I am using and it does a horrible job. Fragment city.



if ($quantity == 0)
 {
$gone = mysql_query("DELETE FROM {$config["prefix"]}_my_items WHERE
uid={$session["uid"]} AND id = '$item'");
  }




Thanks
Jennifer


--
The sleeper has awaken


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002



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




[PHP-DB] Delete from mysql table is there a way to....

2002-04-14 Thread Jennifer Downey

Hi all,

Is there a way to delete a record from a mysql table without fragmenting the
db?

Here is the query I am using and it does a horrible job. Fragment city.






if ($quantity == 0)
 {
$gone = mysql_query("DELETE FROM {$config["prefix"]}_my_items WHERE
uid={$session["uid"]} AND id = '$item'");
  }







Thanks
Jennifer

--
The sleeper has awaken


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002



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




Re: [PHP-DB] Re: how to notify admin by e-mail only once if mysq

2002-04-14 Thread Ken Thompson

On Sunday 14 April 2002 03:24 pm, Ruprecht Helms wrote:
> Hi Lisi,
>
> > Pardon my ignorance, but what's webmin?
>
> not a problem. Webmin is a webbased administrationtool
> for different things to administrate. It begins from
> useraccounting and ends by administration squid, apache,
> postfix/qmail, samba, and others.
>
> Regards,
> Ruprecht
>
> --
> E-Mail: Ruprecht Helms <[EMAIL PROTECTED]>
> Date: 14-Apr-02
> Time: 23:21:26
>
> to be informed -> http://www.rheyn.de <-
>
> This message was sent by XFMail
> --
On a Linux system you can find Webmin by typing http://localhost:1
Some systems require a secure connection to Webmin, in that case you'd type 
https://localhost:1
HTH
-- 
Ken Thompson, North West Antique Autos
Payette, Idaho
Email: [EMAIL PROTECTED]
http://www.nwaa.com
Sales and brokering of antique autos and parts.

Linux- Coming Soon To A Desktop Near You
Registered Linux User #183936

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




Re: [PHP-DB] Re: how to notify admin by e-mail only once if mysq

2002-04-14 Thread Ruprecht Helms

Hi Lisi,

> Pardon my ignorance, but what's webmin?

not a problem. Webmin is a webbased administrationtool
for different things to administrate. It begins from
useraccounting and ends by administration squid, apache,
postfix/qmail, samba, and others.

Regards,
Ruprecht

--
E-Mail: Ruprecht Helms <[EMAIL PROTECTED]>
Date: 14-Apr-02
Time: 23:21:26

to be informed -> http://www.rheyn.de <-

This message was sent by XFMail
--

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




Re: [PHP-DB] Extracting the essence!

2002-04-14 Thread #Linux

Tanks so far, but if  I want don't want to display the 1st and 4th line.


- Original Message -
From: "Lisi" <[EMAIL PROTECTED]>
To: "#Linux" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, April 14, 2002 10:55 PM
Subject: Re: [PHP-DB] Extracting the essence!


>
> >Try something like the following to extract the contents of the array by
> >looping through it:
>
> >$test= preg_replace ($search, $replace, $dokument);
>
> while (list ($key, $val) = each($test)) {
>  echo $key = $val;
> }
>
> HTH
>
> -Lisi
>


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




Re: [PHP-DB] Re: how to notify admin by e-mail only once if mysql server is down

2002-04-14 Thread Lisi

Pardon my ignorance, but what's webmin?

Thanks,

-Lisi


At 11:14 AM 4/12/02 -0600, Ray Hunter wrote:
>You can use webmin and set up the alert there for mysql.  I use it for my
>webserver and database servers.  It sends out 1 email for me telling me what
>is down.
>
>Ray Hunter
>
>
>"Andy" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi there,
> >
> > I am wondering if it would be possible to set up a php application like
> > this:
> >
> > If the mysql server is down notify by e-mail, but only once.
> > Right now I am getting an e-mail per view if the server is down (might be
> > lots of e-mails :-)
> >
> > thanx for any hint,
> >
> >
> > Andy
> >
> >
>
>
>
>--
>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] Extracting the essence!

2002-04-14 Thread Lisi


>Try something like the following to extract the contents of the array by 
>looping through it:

>$test= preg_replace ($search, $replace, $dokument);

while (list ($key, $val) = each($test)) {
 echo $key = $val;
}

HTH

-Lisi


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




[PHP-DB] Extracting the essence!

2002-04-14 Thread #Linux

Hi ppl!

I want to  strip html sites from the tags, only leaving the data from a  entity.
The info i would like to insert into a mysql table. 

Have tried to use the following code with various $dokument variables, but it dont 
preform as expected.

http://localhost/php/index.html";);

$search = array ("']*?>.*?'si", 
 "']*?>.*?'si",  
 "'<[\/\!]*?[^<>]*?>'si",   
 "'([\r\n])[\s]+'", 
 "'&(quot|#34);'i",  
 "'&(amp|#38);'i",
 "'&(lt|#60);'i",
 "'&(gt|#62);'i",
 "'&(nbsp|#160);'i",
 "'&(iexcl|#161);'i",
 "'&(cent|#162);'i",
 "'&(pound|#163);'i",
 "'&(copy|#169);'i",
 "'&#(\d+);'e");  


$replace = array ("",
  "",
  "\\1",
  "\"",
  "&",
  "<",
  ">",
  " ",
  chr(161),
  chr(162),
  chr(163),
  chr(169)
  //,chr(\\1)
);



$test= preg_replace ($search, $replace, $dokument);

echo $test;

php?>


The output of this script comes as:


Array



Stan



Re: [PHP-DB] MySQL to Email and Line Breaks

2002-04-14 Thread DL Neil

Jeff,

Is there something about the evaluation of \n in different types of
strings, eg single quotes/double quotes? (I don't know the answer)...
FWIW I don't like (perhaps, I don't trust) the \r\n type of short-cuts.

Herewith some sample code:
...
   $LinkText= "Requested data can be found at: $source" . CRLF .
CRLF .
"Run date: $DocDate" . CRLF;
...

The constants are defined in an Include/Require file:
...
define( 'LF',  chr(  10 ) );
define( 'CR',  chr(  13 ) );
define( 'CRLF',   CR.LF );
...

It works for me!

Regards,
=dn


> How do I get it to do that? I tried replacing \n with \r\n but it's
not
> even finding any \n. This is really puzzling me. If I copy the data
> from the database field using MySQL-Front and paste it into a word
> processor it will have the line breaks retained. But what is it in the
> data that shows these breaks? I can't find any \n in the data. Then
> when it's sent via email of course there are no line breaks displayed.
> Jeff Oien
>
> > Hiya,
> >
> > If I remember correctly, you much send both \r and \n to terminate a
line
> > on an e-mail, regardless of the platform. This should include the
header
> > aswell.
> >
> > At 12:00 14/04/2002 +0100, DL Neil wrote:
> > >Jeff,
> > >
> > > > I have a form where someone enters the body of an email message
> > > > into a  part of a form to be sent out to a list. Then
a
> > >script
> > > > retrieves the body and sends it via email. However I can't get
line
> > >breaks
> > > > to show up (I'm using MS Outlook) even if I enter the \n into
the
> > >textarea
> > > > form and those \n show up in the database data. I must be
missing
> > > > something. Thanks for any help.
> > >
> > >
> > >Line Breaks across different OpSys:
> > >
> > >*nix: newline character
> > >Mac: carriage return character
> > >Windows: both CR and LF
> > >
> > >LF = Newline/Line Break/Line Feed = ASCII chr(10)
> > >CR = Carriage Return = ASCII chr(13)
> > >
> > >Regards,
> > >=dn
> > >
> > >
> > >--
> > >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




RE: [PHP-DB] MySQL to Email and Line Breaks

2002-04-14 Thread Jeff Oien

How do I get it to do that? I tried replacing \n with \r\n but it's not
even finding any \n. This is really puzzling me. If I copy the data
from the database field using MySQL-Front and paste it into a word 
processor it will have the line breaks retained. But what is it in the 
data that shows these breaks? I can't find any \n in the data. Then 
when it's sent via email of course there are no line breaks displayed.
Jeff Oien

> Hiya,
> 
> If I remember correctly, you much send both \r and \n to terminate a line 
> on an e-mail, regardless of the platform. This should include the header 
> aswell.
> 
> At 12:00 14/04/2002 +0100, DL Neil wrote:
> >Jeff,
> >
> > > I have a form where someone enters the body of an email message
> > > into a  part of a form to be sent out to a list. Then a
> >script
> > > retrieves the body and sends it via email. However I can't get line
> >breaks
> > > to show up (I'm using MS Outlook) even if I enter the \n into the
> >textarea
> > > form and those \n show up in the database data. I must be missing
> > > something. Thanks for any help.
> >
> >
> >Line Breaks across different OpSys:
> >
> >*nix: newline character
> >Mac: carriage return character
> >Windows: both CR and LF
> >
> >LF = Newline/Line Break/Line Feed = ASCII chr(10)
> >CR = Carriage Return = ASCII chr(13)
> >
> >Regards,
> >=dn
> >
> >
> >--
> >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] Insert select does not insert all rows.

2002-04-14 Thread olinux

The script is probably timimg out. Default timeout is
30 seconds.

Stick this in your script 
set_time_limit(0);

set_time_limit() has no effect when PHP is running in
safe mode
http://www.php.net/manual/en/function.set-time-limit.php

olinux


--- andy <[EMAIL PROTECTED]> wrote:
> Hi there,
> 
> I am trying to update a table with new rows. The new
> rows are in another
> table so thought a insert select would be the right
> choice.
> 
> Unfortunatelly it is only inserting about 400 rows,
> but the table contains
> more than 700.
> 
> So I do really not know whats going on. Maybe
> someone could help on this.
> Thanx in advance.
> 
> Andy
> 
> Statement:
> insert into geodata_backup.provinces_test
> (country_code,province,province_id)
> select country_code, name, province_id
> from import.provinces_update_imported
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

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




Re: [PHP-DB] Re: MySQL to Email and Line Breaks

2002-04-14 Thread DL Neil

Sure he could (and it might look a lot nicer if he did...), but:
1 he said he doesn't want to,
2 ASCII text can also be formatted (with line breaks, at least),
3 using HTML encourages email bloat, and
4 some email clients don't render HTML

Regards,
=dn


> Hey, couldn't you just send the text as HTML and it would retain any
> formatting?
>
> Bob
>
> "Jeff Oien" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I have a form where someone enters the body of an email message
> > into a  part of a form to be sent out to a list. Then a
script
> > retrieves the body and sends it via email. However I can't get line
breaks
> > to show up (I'm using MS Outlook) even if I enter the \n into the
textarea
> > form and those \n show up in the database data. I must be missing
> > something. Thanks for any help.
> > Jeff Oien
>
>
>
> --
> 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 to Email and Line Breaks

2002-04-14 Thread phplists

Hey, couldn't you just send the text as HTML and it would retain any
formatting?

Bob

"Jeff Oien" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have a form where someone enters the body of an email message
> into a  part of a form to be sent out to a list. Then a script
> retrieves the body and sends it via email. However I can't get line breaks
> to show up (I'm using MS Outlook) even if I enter the \n into the textarea
> form and those \n show up in the database data. I must be missing
> something. Thanks for any help.
> Jeff Oien



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




Re: [PHP-DB] MySQL to Email and Line Breaks

2002-04-14 Thread Jonathan David Edwin Wright

Hiya,

If I remember correctly, you much send both \r and \n to terminate a line 
on an e-mail, regardless of the platform. This should include the header 
aswell.

At 12:00 14/04/2002 +0100, DL Neil wrote:
>Jeff,
>
> > I have a form where someone enters the body of an email message
> > into a  part of a form to be sent out to a list. Then a
>script
> > retrieves the body and sends it via email. However I can't get line
>breaks
> > to show up (I'm using MS Outlook) even if I enter the \n into the
>textarea
> > form and those \n show up in the database data. I must be missing
> > something. Thanks for any help.
>
>
>Line Breaks across different OpSys:
>
>*nix: newline character
>Mac: carriage return character
>Windows: both CR and LF
>
>LF = Newline/Line Break/Line Feed = ASCII chr(10)
>CR = Carriage Return = ASCII chr(13)
>
>Regards,
>=dn
>
>
>--
>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] Insert select does not insert all rows.

2002-04-14 Thread andy

Hi there,

I am trying to update a table with new rows. The new rows are in another
table so thought a insert select would be the right choice.

Unfortunatelly it is only inserting about 400 rows, but the table contains
more than 700.

So I do really not know whats going on. Maybe someone could help on this.
Thanx in advance.

Andy

Statement:
insert into geodata_backup.provinces_test
(country_code,province,province_id)
select country_code, name, province_id
from import.provinces_update_imported



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




[PHP-DB] Re: how connect a remote data base MSAccess with PHP in Linux system

2002-04-14 Thread John Lim

Hello Silvia,

Try using the database abstraction library ADOdb. It supports installing
a stub server (written in PHP) on the Windows server, and you can send sql
queries from
Linux to the Windows machine via http.

This is a 100% php solution. See http://php.weblogs.com/adodb_csv

"Silvia Mahiques" <[EMAIL PROTECTED]> wrote in message
002801c1e066$acf41d50$1a9cd29b@tscpc6">news:002801c1e066$acf41d50$1a9cd29b@tscpc6...
Hi friend!
I have a question...
I have a remote database in Microsoft Access on a WinNT System, and a Apache
and PHP on Linux System. How can I connect this?

There is one function in PHP for make this:

odbc_connect(DSN,user,password)

The question is:  what is DSN in my case? How I can to specified the host
and path where is situate the data base?

DSN (Data Source Name) in local host is the name of the DataBase, but in
remote host, what I need do?

Thanks in advance.


Silvia Mahiques



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




Re: [PHP-DB] MySQL to Email and Line Breaks

2002-04-14 Thread DL Neil

Jeff,

> I have a form where someone enters the body of an email message
> into a  part of a form to be sent out to a list. Then a
script
> retrieves the body and sends it via email. However I can't get line
breaks
> to show up (I'm using MS Outlook) even if I enter the \n into the
textarea
> form and those \n show up in the database data. I must be missing
> something. Thanks for any help.


Line Breaks across different OpSys:

*nix: newline character
Mac: carriage return character
Windows: both CR and LF

LF = Newline/Line Break/Line Feed = ASCII chr(10)
CR = Carriage Return = ASCII chr(13)

Regards,
=dn


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