RES: [PHP-DB] INSERT query with Primary and foreign key

2008-02-26 Thread Thiago Pojda
This is more SQL than PHP, how did you create your constraints?

Did you set insert on CASCADE?

-Mensagem original-
De: Nasreen Laghari [mailto:[EMAIL PROTECTED] 
Enviada em: segunda-feira, 25 de fevereiro de 2008 22:15
Para: php-db@lists.php.net
Assunto: [PHP-DB] INSERT query with Primary and foreign key

Hi,

I need help to insert date into two tables when tables have primary and
foreign key relationship using php. I tried simple INSERT query but foreign
key colum is storing NULL.

Regards

Nasreen


 


Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

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



[PHP-DB] PHP, MySQL and Lookups

2008-02-26 Thread Henry Felton
Hi everyone,

I'm just getting into PHP at the moment and was wondering; what code would I
need to look at a field value entered in a form, then if that value is found
in my table, enter all the other information entered in the form, to the
other fields on that record.
Basically, what I'm trying to do is give a load of users an individual
password that they enter, with various other pieces of information such as
year of birth, single/married or whatever, into a form. In MySQL I have a
table with three fields, but only the password one has any data in them. A
script will then took in the table to find the password entered in the form,
and then append all the other information (i.e. data for the other two
fields) to the particular record that holds the password value entered.

Hope that made sense, but I'd be so grateful if someone could help me with
this

Thanks,
Max


RE: [PHP-DB] pg_escape with copy

2008-02-26 Thread Bastien Koert

try using htmlentitites first to conver the ' to #39; instead
 
bastien
 Date: Mon, 25 Feb 2008 21:46:17 -0500 From: [EMAIL PROTECTED] To: 
 php-db@lists.php.net Subject: [PHP-DB] pg_escape with copy  I have data 
 that I'm running through pg_escape_sting in php and then adding to stdin for 
 a copy command. The problem is O'reilly is being changed to O''Reilly in 
 the string and then in the db. I saw with the copy command I can specify the 
 escape but it isn't working for me. Should this command fix this double 
 'single' quote issue when I put it in the db? And what is the proper 
 syntax?  COPY mytable FROM stdin with escapeThanks!
_



Re: [PHP-DB] PHP, MySQL and Lookups

2008-02-26 Thread Jason Pruim


On Feb 26, 2008, at 8:55 AM, Henry Felton wrote:


Hi everyone,

I'm just getting into PHP at the moment and was wondering; what code  
would I
need to look at a field value entered in a form, then if that value  
is found
in my table, enter all the other information entered in the form, to  
the

other fields on that record.
Basically, what I'm trying to do is give a load of users an individual
password that they enter, with various other pieces of information  
such as
year of birth, single/married or whatever, into a form. In MySQL I  
have a
table with three fields, but only the password one has any data in  
them. A
script will then took in the table to find the password entered in  
the form,

and then append all the other information (i.e. data for the other two
fields) to the particular record that holds the password value  
entered.


Hope that made sense, but I'd be so grateful if someone could help  
me with

this


What you're looking for to me sounds like using the UPDATE syntax in  
MySQL... something along the lines of:


$sql = UPDATE tablename field1=$MySuperData1 field2=$MySuperData2  
where password=$MySuperHardPassword;


Of course, this is untested check the mysql site for specifics on  
using update. Also... always be sure to escape your data or you are  
asking for trouble...


That should be enough to get you started!



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
[EMAIL PROTECTED]

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



RES: [PHP-DB] PHP, MySQL and Lookups

2008-02-26 Thread Thiago Pojda
Lemme see if I get this right:

You could just do this:

UPDATE userPW SET field1=$satinized_post_field1,
field2=$sanitized_post_field2 WHERE userid=$userId and password=$userPw


if (mysql_affected_rows($conn)  0){
echo updated
}else{
echo error: .mysql_error($conn);
}

http://docs.php.net/manual/function.mysql-query.php

I suppose you have a relationship between pw and user (as stated in
userid=$userid).


Hope this helps!

-Mensagem original-
De: Henry Felton [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 26 de fevereiro de 2008 10:55
Para: php-db@lists.php.net
Assunto: [PHP-DB] PHP, MySQL and Lookups

Hi everyone,

I'm just getting into PHP at the moment and was wondering; what code would I
need to look at a field value entered in a form, then if that value is found
in my table, enter all the other information entered in the form, to the
other fields on that record.
Basically, what I'm trying to do is give a load of users an individual
password that they enter, with various other pieces of information such as
year of birth, single/married or whatever, into a form. In MySQL I have a
table with three fields, but only the password one has any data in them. A
script will then took in the table to find the password entered in the form,
and then append all the other information (i.e. data for the other two
fields) to the particular record that holds the password value entered.

Hope that made sense, but I'd be so grateful if someone could help me with
this

Thanks,
Max

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



RE: RES: [PHP-DB] INSERT query with Primary and foreign key

2008-02-26 Thread Bastien Koert

do you mean that you have a primary key on table a with an fk to table b? and 
on table b you have a primary key and an fk to table a?
 
if so, you've created a circular referential integrity constraint. The table 
deadlocks since the values must exist in the other (tables a and b) table. 
There are several solutions:
 
1. if the db supports it, use deferred constraints (check the docs)
2. remove one of the FK constraints from one of the tables 
 
 
 
 
Bastien
 
 
 
 
 
 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; php-db@lists.php.net Date: 
 Tue, 26 Feb 2008 09:17:30 -0300 Subject: RES: [PHP-DB] INSERT query with 
 Primary and foreign key  This is more SQL than PHP, how did you create your 
 constraints?  Did you set insert on CASCADE?  -Mensagem 
 original- De: Nasreen Laghari [mailto:[EMAIL PROTECTED]  Enviada em: 
 segunda-feira, 25 de fevereiro de 2008 22:15 Para: php-db@lists.php.net 
 Assunto: [PHP-DB] INSERT query with Primary and foreign key  Hi,  I need 
 help to insert date into two tables when tables have primary and foreign key 
 relationship using php. I tried simple INSERT query but foreign key colum is 
 storing NULL.  Regards  Nasreen
  
  Be a better friend, newshound, and know-it-all with Yahoo! Mobile. 
 Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ   
 --  PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: 
 http://www.php.net/unsub.php 
_



Re: [PHP-DB] PHP, MySQL and Lookups

2008-02-26 Thread Daniel Brown
On Tue, Feb 26, 2008 at 8:55 AM, Henry Felton [EMAIL PROTECTED] wrote:
 Hi everyone,

  I'm just getting into PHP at the moment and was wondering; what code would I
  need to look at a field value entered in a form, then if that value is found
  in my table, enter all the other information entered in the form, to the
  other fields on that record.
  Basically, what I'm trying to do is give a load of users an individual
  password that they enter, with various other pieces of information such as
  year of birth, single/married or whatever, into a form. In MySQL I have a
  table with three fields, but only the password one has any data in them. A
  script will then took in the table to find the password entered in the form,
  and then append all the other information (i.e. data for the other two
  fields) to the particular record that holds the password value entered.

Henry (AKA: Max),

Try this:

?
include('config.php'); // Your database configuration and connection
information

if($_POST) {
$dob = mysql_real_escape_string($_POST['dob']);
$married = mysql_real_escape_string($_POST['married']);
$pass = mysql_real_escape_string($_POST['pass']);

// When designing the database, call the password field `pass`
(without quotes).
// The word `password` is a MySQL reserved word and could cause errors.
$sql = UPDATE table_name SET dob='.$dob.',
married='.$married.' WHERE
pass='.$pass.' LIMIT 1;
mysql_query($sql) or die(Incorrect password specified.  Please
try again.);

// If we've reached here, then we can do whatever we want to acknowledge.
// Let's redirect to a thank you page, sending the variables as a
GET request
// to be parsed by the thank you page script.
header(Location: thankyou.php?dob=.$dob.married=.$married);
exit;
}
?
form method=post action=?=$_SERVER['PHP_SELF'];? /
Password: input type=password name=pass /br /
Date of birth (mm/dd/): input type=text name=dob /br /
Status: input type=radio name=married value=Married /Married
input type=radio name=married value=Single /Single
input type=radio name=married value=Widowed /Widowed
input type=radio name=married value=Divorced /Divorced
input type=radio name=married value=Wishing
/Wishing I Was Singlebr /
input type=submit value=Process Now /
/form
-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

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



Re: [PHP-DB] INSERT query with Primary and foreign key

2008-02-26 Thread Daniel Brown
On Mon, Feb 25, 2008 at 8:15 PM, Nasreen Laghari
[EMAIL PROTECTED] wrote:
 Hi,

  I need help to insert date into two tables when tables have primary and 
 foreign key relationship using php. I tried simple INSERT query but foreign 
 key colum is storing NULL.

What's your SQL query string, Nasreen?

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

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



[PHP-DB] MySQL replication delaying issue

2008-02-26 Thread Lasitha Alawatta
 

Hello Everybody,

 

We have 6 multi-master MySql instances within a LAN , that are
replicating is a sequential manner.

Server Environment :  Six identical Linux Enterprise version 4 running,
servers with having MySQL version 6. 

we are using MySQL multi-master replication method for database
replication.

 

There is a delay (5-7 minutes) of that data replication process. 

We notice that it's because of MySQL table locking.

 

Your comments are highly appreciated.

 

 

Many thanks in advance and best regards,

 

Lasitha Alawatta

Application Developer

Destinations of the World Holding Establishment

P O Box: 19950

Dubai, United Arab Emirates

( Ph +971 4 295 8510 (Board) / 1464 (Ext.)

7 Fax +971 4 295 8910
+ [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  

  http://www.dotw.com/ 

 

DOTW DISCLAIMER:

This e-mail and any attachments are strictly confidential and intended for the 
addressee only. If you are not the named addressee you must not disclose, copy 
or take
any action in reliance of this transmission and you should notify us as soon as 
possible. If you have received it in error, please contact the message sender 
immediately.
This e-mail and any attachments are believed to be free from viruses but it is 
your responsibility to carry out all necessary virus checks and DOTW accepts no 
liability
in connection therewith. 

This e-mail and all other electronic (including voice) communications from the 
sender's company are for informational purposes only.  No such communication is 
intended
by the sender to constitute either an electronic record or an electronic 
signature or to constitute any agreement by the sender to conduct a transaction 
by electronic means.


Re: [PHP-DB] MySQL replication delaying issue

2008-02-26 Thread Daniel Brown
On Tue, Feb 26, 2008 at 10:49 AM, Lasitha Alawatta [EMAIL PROTECTED] wrote:
 Hello Everybody,

 We have 6 multi-master MySql instances within a LAN , that are replicating
 is a sequential manner.

 Server Environment :  Six identical Linux Enterprise version 4 running,
 servers with having MySQL version 6.

 we are using MySQL multi-master replication method for database
 replication.

 There is a delay (5-7 minutes) of that data replication process. We notice 
 that it's because of MySQL table locking.

 Your comments are highly appreciated.

Ask on a MySQL list.  It has nothing to do with PHP.

http://lists.mysql.com/

Specifically: Replication - http://lists.mysql.com/replication

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

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



RES: [PHP-DB] MySQL replication delaying issue

2008-02-26 Thread Thiago Pojda
I did not say: do not ask on this list.
 
I said: you would get BETTER answers if you asked on a MySQL list.

  _  

De: Lasitha Alawatta [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 26 de fevereiro de 2008 13:47
Para: Thiago Pojda
Assunto: RE: [PHP-DB] MySQL replication delaying issue



 

Hay, 

If U don’t know about that then u can ignore that mail. U need not to answer
each and every mails in this list.

MOST of the PHP developer are using MYSQL as backend. 

 

That’s Y I sent that message to phpresources  list also.

 

 

 

 

 

From: Thiago Pojda [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 26, 2008 8:39 PM
To: Lasitha Alawatta; php-db@lists.php.net; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RES: [PHP-DB] MySQL replication delaying issue

 

Not trying to be an ass, but wouldn't you get better answers if you asked in
a MySQL list?

 

I work with PHP, but have near to 0 experience with MySQL.

 

  _  

De: Lasitha Alawatta [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 26 de fevereiro de 2008 12:50
Para: php-db@lists.php.net; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Assunto: [PHP-DB] MySQL replication delaying issue
Prioridade: Alta

 

Hello Everybody,

 

We have 6 multi-master MySql instances within a LAN , that are replicating
is a sequential manner.

Server Environment :  Six identical Linux Enterprise version 4 running,
servers with having MySQL version 6. 

we are using “MySQL multi-master replication” method for database
replication.

 

There is a delay (5-7 minutes) of that data replication process. 

We notice that it’s because of MySQL table locking.

 

Your comments are highly appreciated.

 

 

Many thanks in advance and best regards,

 

Lasitha Alawatta

Application Developer

Destinations of the World Holding Establishment

P O Box: 19950

Dubai, United Arab Emirates

( Ph +971 4 295 8510 (Board) / 1464 (Ext.)

7 Fax +971 4 295 8910
+ [EMAIL PROTECTED] 

 http://www.dotw.com/ cid:image002.jpg@01C7A7A4.0AC70A00

 

 



DOTW DISCLAIMER:

This e-mail and any attachments are strictly confidential and intended for
the addressee only. If you are not the named addressee you must not
disclose, copy or take
any action in reliance of this transmission and you should notify us as soon
as possible. If you have received it in error, please contact the message
sender immediately.
This e-mail and any attachments are believed to be free from viruses but it
is your responsibility to carry out all necessary virus checks and DOTW
accepts no liability
in connection therewith. 

This e-mail and all other electronic (including voice) communications from
the sender's company are for informational purposes only.  No such
communication is intended
by the sender to constitute either an electronic record or an electronic
signature or to constitute any agreement by the sender to conduct a
transaction by electronic means.

 



RES: [PHP-DB] MySQL replication delaying issue

2008-02-26 Thread Thiago Pojda
Not trying to be an ass, but wouldn't you get better answers if you asked in
a MySQL list?
 
I work with PHP, but have near to 0 experience with MySQL.

  _  

De: Lasitha Alawatta [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 26 de fevereiro de 2008 12:50
Para: php-db@lists.php.net; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Assunto: [PHP-DB] MySQL replication delaying issue
Prioridade: Alta



 

Hello Everybody,

 

We have 6 multi-master MySql instances within a LAN , that are replicating
is a sequential manner.

Server Environment :  Six identical Linux Enterprise version 4 running,
servers with having MySQL version 6. 

we are using “MySQL multi-master replication” method for database
replication.

 

There is a delay (5-7 minutes) of that data replication process. 

We notice that it’s because of MySQL table locking.

 

Your comments are highly appreciated.

 

 

Many thanks in advance and best regards,

 

Lasitha Alawatta

Application Developer

Destinations of the World Holding Establishment

P O Box: 19950

Dubai, United Arab Emirates

( Ph +971 4 295 8510 (Board) / 1464 (Ext.)

7 Fax +971 4 295 8910
+  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] 

 http://www.dotw.com/ cid:image002.jpg@01C7A7A4.0AC70A00

 




DOTW DISCLAIMER:

This e-mail and any attachments are strictly confidential and intended for
the addressee only. If you are not the named addressee you must not
disclose, copy or take
any action in reliance of this transmission and you should notify us as soon
as possible. If you have received it in error, please contact the message
sender immediately.
This e-mail and any attachments are believed to be free from viruses but it
is your responsibility to carry out all necessary virus checks and DOTW
accepts no liability
in connection therewith. 

This e-mail and all other electronic (including voice) communications from
the sender's company are for informational purposes only.  No such
communication is intended
by the sender to constitute either an electronic record or an electronic
signature or to constitute any agreement by the sender to conduct a
transaction by electronic means.



RE: [PHP-DB] MySQL replication delaying issue

2008-02-26 Thread Lasitha Alawatta
 

Oky, Sorry for that.. J

 

 

From: Thiago Pojda [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 26, 2008 8:49 PM
To: Lasitha Alawatta
Cc: php-db@lists.php.net
Subject: RES: [PHP-DB] MySQL replication delaying issue

 

I did not say: do not ask on this list.

 

I said: you would get BETTER answers if you asked on a MySQL list.

 



De: Lasitha Alawatta [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 26 de fevereiro de 2008 13:47
Para: Thiago Pojda
Assunto: RE: [PHP-DB] MySQL replication delaying issue

 

Hay, 

If U don't know about that then u can ignore that mail. U need not to answer 
each and every mails in this list.

MOST of the PHP developer are using MYSQL as backend. 

 

That's Y I sent that message to phpresources  list also.

 

 

 

 

 

From: Thiago Pojda [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 26, 2008 8:39 PM
To: Lasitha Alawatta; php-db@lists.php.net; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RES: [PHP-DB] MySQL replication delaying issue

 

Not trying to be an ass, but wouldn't you get better answers if you asked in a 
MySQL list?

 

I work with PHP, but have near to 0 experience with MySQL.

 



De: Lasitha Alawatta [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 26 de fevereiro de 2008 12:50
Para: php-db@lists.php.net; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Assunto: [PHP-DB] MySQL replication delaying issue
Prioridade: Alta

 

Hello Everybody,

 

We have 6 multi-master MySql instances within a LAN , that are replicating is a 
sequential manner.

Server Environment :  Six identical Linux Enterprise version 4 running, servers 
with having MySQL version 6. 

we are using MySQL multi-master replication method for database replication.

 

There is a delay (5-7 minutes) of that data replication process. 

We notice that it's because of MySQL table locking.

 

Your comments are highly appreciated.

 

 

Many thanks in advance and best regards,

 

Lasitha Alawatta

Application Developer

Destinations of the World Holding Establishment

P O Box: 19950

Dubai, United Arab Emirates

( Ph +971 4 295 8510 (Board) / 1464 (Ext.)

7 Fax +971 4 295 8910
+ [EMAIL PROTECTED] 

cid:image002.jpg@01C7A7A4.0AC70A00 http://www.dotw.com/ 

 

 


DOTW DISCLAIMER:

This e-mail and any attachments are strictly confidential and intended for the 
addressee only. If you are not the named addressee you must not disclose, copy 
or take
any action in reliance of this transmission and you should notify us as soon as 
possible. If you have received it in error, please contact the message sender 
immediately.
This e-mail and any attachments are believed to be free from viruses but it is 
your responsibility to carry out all necessary virus checks and DOTW accepts no 
liability
in connection therewith. 

This e-mail and all other electronic (including voice) communications from the 
sender's company are for informational purposes only.  No such communication is 
intended
by the sender to constitute either an electronic record or an electronic 
signature or to constitute any agreement by the sender to conduct a transaction 
by electronic means.

 

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

RE: [PHP-DB] MySQL replication delaying issue

2008-02-26 Thread Lasitha Alawatta
Hello,

 

Thanks a LOT...

 

Best Regards,

Lasitha

 

From: Thiago Pojda [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 26, 2008 9:51 PM
To: Lasitha Alawatta
Cc: php-db@lists.php.net
Subject: RES: [PHP-DB] MySQL replication delaying issue

 

That's ok, good luck with your problem.

 

Perhaps this could help :)

http://forums.mysql.com/read.php?26,197734,197734#msg-197734

 



De: Lasitha Alawatta [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 26 de fevereiro de 2008 14:44
Para: Thiago Pojda
Cc: php-db@lists.php.net
Assunto: RE: [PHP-DB] MySQL replication delaying issue

 

Oky, Sorry for that.. J

 

 

From: Thiago Pojda [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 26, 2008 8:49 PM
To: Lasitha Alawatta
Cc: php-db@lists.php.net
Subject: RES: [PHP-DB] MySQL replication delaying issue

 

I did not say: do not ask on this list.

 

I said: you would get BETTER answers if you asked on a MySQL list.

 



De: Lasitha Alawatta [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 26 de fevereiro de 2008 13:47
Para: Thiago Pojda
Assunto: RE: [PHP-DB] MySQL replication delaying issue

 

Hay, 

If U don't know about that then u can ignore that mail. U need not to answer 
each and every mails in this list.

MOST of the PHP developer are using MYSQL as backend. 

 

That's Y I sent that message to phpresources  list also.

 

 

 

 

 

From: Thiago Pojda [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 26, 2008 8:39 PM
To: Lasitha Alawatta; php-db@lists.php.net; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RES: [PHP-DB] MySQL replication delaying issue

 

Not trying to be an ass, but wouldn't you get better answers if you asked in a 
MySQL list?

 

I work with PHP, but have near to 0 experience with MySQL.

 



De: Lasitha Alawatta [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 26 de fevereiro de 2008 12:50
Para: php-db@lists.php.net; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Assunto: [PHP-DB] MySQL replication delaying issue
Prioridade: Alta

 

Hello Everybody,

 

We have 6 multi-master MySql instances within a LAN , that are replicating is a 
sequential manner.

Server Environment :  Six identical Linux Enterprise version 4 running, servers 
with having MySQL version 6. 

we are using MySQL multi-master replication method for database replication.

 

There is a delay (5-7 minutes) of that data replication process. 

We notice that it's because of MySQL table locking.

 

Your comments are highly appreciated.

 

 

Many thanks in advance and best regards,

 

Lasitha Alawatta

Application Developer

Destinations of the World Holding Establishment

P O Box: 19950

Dubai, United Arab Emirates

( Ph +971 4 295 8510 (Board) / 1464 (Ext.)

7 Fax +971 4 295 8910
+ [EMAIL PROTECTED] 

cid:image002.jpg@01C7A7A4.0AC70A00 http://www.dotw.com/ 

 

 


DOTW DISCLAIMER:

This e-mail and any attachments are strictly confidential and intended for the 
addressee only. If you are not the named addressee you must not disclose, copy 
or take
any action in reliance of this transmission and you should notify us as soon as 
possible. If you have received it in error, please contact the message sender 
immediately.
This e-mail and any attachments are believed to be free from viruses but it is 
your responsibility to carry out all necessary virus checks and DOTW accepts no 
liability
in connection therewith. 

This e-mail and all other electronic (including voice) communications from the 
sender's company are for informational purposes only.  No such communication is 
intended
by the sender to constitute either an electronic record or an electronic 
signature or to constitute any agreement by the sender to conduct a transaction 
by electronic means.

 

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

RES: [PHP-DB] MySQL replication delaying issue

2008-02-26 Thread Thiago Pojda
That's ok, good luck with your problem.
 
Perhaps this could help :)
http://forums.mysql.com/read.php?26,197734,197734#msg-197734

  _  

De: Lasitha Alawatta [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 26 de fevereiro de 2008 14:44
Para: Thiago Pojda
Cc: php-db@lists.php.net
Assunto: RE: [PHP-DB] MySQL replication delaying issue



 

Oky, Sorry for that.. J

 

 

From: Thiago Pojda [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 26, 2008 8:49 PM
To: Lasitha Alawatta
Cc: php-db@lists.php.net
Subject: RES: [PHP-DB] MySQL replication delaying issue

 

I did not say: do not ask on this list.

 

I said: you would get BETTER answers if you asked on a MySQL list.

 

  _  

De: Lasitha Alawatta [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 26 de fevereiro de 2008 13:47
Para: Thiago Pojda
Assunto: RE: [PHP-DB] MySQL replication delaying issue

 

Hay, 

If U don’t know about that then u can ignore that mail. U need not to answer
each and every mails in this list.

MOST of the PHP developer are using MYSQL as backend. 

 

That’s Y I sent that message to phpresources  list also.

 

 

 

 

 

From: Thiago Pojda [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 26, 2008 8:39 PM
To: Lasitha Alawatta; php-db@lists.php.net; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RES: [PHP-DB] MySQL replication delaying issue

 

Not trying to be an ass, but wouldn't you get better answers if you asked in
a MySQL list?

 

I work with PHP, but have near to 0 experience with MySQL.

 

  _  

De: Lasitha Alawatta [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 26 de fevereiro de 2008 12:50
Para: php-db@lists.php.net; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Assunto: [PHP-DB] MySQL replication delaying issue
Prioridade: Alta

 

Hello Everybody,

 

We have 6 multi-master MySql instances within a LAN , that are replicating
is a sequential manner.

Server Environment :  Six identical Linux Enterprise version 4 running,
servers with having MySQL version 6. 

we are using “MySQL multi-master replication” method for database
replication.

 

There is a delay (5-7 minutes) of that data replication process. 

We notice that it’s because of MySQL table locking.

 

Your comments are highly appreciated.

 

 

Many thanks in advance and best regards,

 

Lasitha Alawatta

Application Developer

Destinations of the World Holding Establishment

P O Box: 19950

Dubai, United Arab Emirates

( Ph +971 4 295 8510 (Board) / 1464 (Ext.)

7 Fax +971 4 295 8910
+ [EMAIL PROTECTED] 

 http://www.dotw.com/ cid:image002.jpg@01C7A7A4.0AC70A00

 

 



DOTW DISCLAIMER:

This e-mail and any attachments are strictly confidential and intended for
the addressee only. If you are not the named addressee you must not
disclose, copy or take
any action in reliance of this transmission and you should notify us as soon
as possible. If you have received it in error, please contact the message
sender immediately.
This e-mail and any attachments are believed to be free from viruses but it
is your responsibility to carry out all necessary virus checks and DOTW
accepts no liability
in connection therewith. 

This e-mail and all other electronic (including voice) communications from
the sender's company are for informational purposes only.  No such
communication is intended
by the sender to constitute either an electronic record or an electronic
signature or to constitute any agreement by the sender to conduct a
transaction by electronic means.

 



Re: [PHP-DB] pg_escape with copy

2008-02-26 Thread Chris

blackwater dev wrote:

I have data that I'm running through pg_escape_sting in php and then adding
to stdin for a copy command.  The problem is O'reilly is being changed to
O''Reilly in the string and then in the db.  I saw with the copy command I
can specify the escape but it isn't working for me.  Should this command fix
this double 'single' quote issue when I put it in the db?  And what is the
proper syntax?


AFAIK copy takes the csv file and imports it (and handles quotes etc 
itself).


So just create your file:

First Name, Last Name
Tim, O'Reilly

and when you copy that in (without the header line), it'll just work.

--
Postgresql  php tutorials
http://www.designmagick.com/

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



Re: [PHP-DB] No resultset with ocibindbyname

2008-02-26 Thread Christopher Jones



Manuel Schölling wrote:

Hi Christopher,

thanks for caring about my problem. ;)


I couldn't reproduce your problem.  What does your table look like?
What version of PHP  OCI8?  What version of Oracle?

I using PHP 5.2.5 on a Linux 2.6.9 machine. The version of OCI8 is 1.2.4
 (Revision 1.269.2.16.2.38, Oracle Instant Client Version 10.2).

The output of select * from v$version is:
Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
PL/SQL Release 8.1.7.0.0 - Production
CORE 8.1.7.0.0 Production
TNS for IBM/AIX RISC System/6000: Version 8.1.7.0.0 - Developmen
NLSRTL Version 3.4.1.0.0 - Production

And here is the output of desc projekte_generisch:
NameNull?   Type
PID NOT NULLCHAR(8)
ANFANG  NOT NULLVARCHAR2(8)
ENDEVARCHAR2(8)
LAENGE  NOT NULLNUMBER

And of course the data record I am searching for.

select * FROM  projekte_generisch where pid='u0test'
PID ANFANG  ENDELAENGE
u0test  utest   8

Hope this helps diagnosting the error.


Do other queries with binds work?  Is PHP using the correct
NLS language configuration?

Chris


--
Christopher Jones, Oracle
Email: [EMAIL PROTECTED]Tel:  +1 650 506 8630
Blog:  http://blogs.oracle.com/opal/   Free PHP Book: http://tinyurl.com/f8jad

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



[PHP-DB] Password Reset

2008-02-26 Thread Nasreen Laghari
Hi,

I have encrypted password in database and I encrypted using MD5().  As it is a 
one-way Hash so I cant get password back to original text !!!

What encrypting technique I used to encrypt password so if user forget, I can 
decrypt password and email it.


Regards

Nasreen


  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

Re: [PHP-DB] Password Reset [bayes]

2008-02-26 Thread Chris Verges
Don't.  Re-generate a randomized password and force the user to reset it
upon first login.  Only allow the user to do this if they answer a security
question successfully.  It's how many online entities will perform password
recovery.

Thanks,

Chris





On 2/26/08 10:52 PM, Nasreen Laghari [EMAIL PROTECTED] wrote:

 Hi,
 
 I have encrypted password in database and I encrypted using MD5().  As it is a
 one-way Hash so I cant get password back to original text !!!
 
 What encrypting technique I used to encrypt password so if user forget, I can
 decrypt password and email it.
 
 
 Regards
 
 Nasreen
 
 
   
 __
 __
 Looking for last minute shopping deals?
 Find them fast with Yahoo! Search.
 http://tools.search.yahoo.com/newsearch/category.php?category=shopping

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



Re: [PHP-DB] Password Reset

2008-02-26 Thread Chris

Nasreen Laghari wrote:

Hi,

I have encrypted password in database and I encrypted using MD5().  As it is a 
one-way Hash so I cant get password back to original text !!!

What encrypting technique I used to encrypt password so if user forget, I can 
decrypt password and email it.


Don't worry about decrypting anything, just generate a new random 
password, email that to them and they can change it again themselves 
once they log in to your app.



--
Postgresql  php tutorials
http://www.designmagick.com/

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