[PHP-DB] Using pg_exec during a copy transaction

2004-07-20 Thread Robert Fitzpatrick
Is it possible when using PostgreSQL to copy data with 'pg_exec($dbh, "COPY tbl FROM stdin");' to issue another pg_exec transaction before 'pg_end_copy($dbh);' is called? My script is hanging after issuing the COPY to read data and then issuing a pg_exec SELECT statement to lookup that data for val

Re: [PHP-DB] Concurrent rutines

2004-07-20 Thread Jason Wong
You have started a new thread by taking an existing posting and replying to it while you changed the subject. That is bad, because it breaks threading. Whenever you reply to a message, your mail client generates a "References:" header that tells all recipients which posting(s) your posting refers

Re: [PHP-DB] DB table creation question

2004-07-20 Thread Jensen, Kimberlee
In addition to making sure both tables are type InnoDB, also make sure you have indexed both the foreign key and its corresponding reference first (this will fix the obtuse errno(150) message). One suggestion I have is to take a bootcamp style class, even online, to solidify the grasp of databa

[PHP-DB] RE: MySQL '!=' ???

2004-07-20 Thread Jensen, Kimberlee
Whenever you are trying to exclude a list, you should use AND, not OR. This is a logic issue. However, to make it more exact, streamlined and simpler use the NOT IN clause. SELECT ... FROM ... WHERE country NOT IN ('Argentina', 'USA', 'Mexico', etc.) -Original Message- From: [EMAIL P

Re: [PHP-DB] Wait Statement... ?

2004-07-20 Thread John W. Holmes
Tim Van Wassenhove wrote: In article <[EMAIL PROTECTED]>, John W. Holmes wrote: Daevid Vincent wrote: Similarly, I could adjust my brute force attack to sleep() a pre-determined amount of time too ;-) Uhmmm.. how effective is a brute force attack where you can only try one combination per second?

[PHP-DB] Concurrent rutines

2004-07-20 Thread Luis Morales
Hello, Does any know how run many procedures concurrently over php. For example: $init = ; While (($t < $timeout ) and ($allresult == 0 ) ){ $t = - $init; launch{ $r[1] = app1; $r[2] = app2; $r[n] = appn; } $allresult = $r[1] && $r[2] && ... && $r[n]; } Regards,

Re: Re[2]: [PHP-DB] Wait Statement... ?

2004-07-20 Thread Jason Wong
On Wednesday 21 July 2004 05:00, Pablo M. Rivas wrote: >sleep() is the brute deffense of the brute force attack... >You can make a script that opens simultaneous attacks One thing to bear in mind is that sleep() will hog resources and can lead to DOS. -- Jason Wong -> Gremlins Associat

Re: [PHP-DB] Wait Statement... ?

2004-07-20 Thread Tim Van Wassenhove
In article <[EMAIL PROTECTED]>, John W. Holmes wrote: > Daevid Vincent wrote: > >> Similarly, I could adjust my brute force attack to sleep() a pre-determined >> amount of time too ;-) > > Uhmmm.. how effective is a brute force attack where you can only try one > combination per second? It's goi

Re[2]: [PHP-DB] Wait Statement... ?

2004-07-20 Thread Pablo M. Rivas
Hello John, sleep() is the brute deffense of the brute force attack... You can make a script that opens simultaneous attacks JWH> I'm not saying using sleep is "the solution" to security problems, but JWH> it can be one layer of your defense. -- Best regards, Pablo -- PHP Database Mai

Re: [PHP-DB] Wait Statement... ?

2004-07-20 Thread Ignatius Reilly
Why silly?? it just makes you wait one second on the login page BEFORE the validation process, not on other pages. I use it everywhere. Ignatius _ - Original Message - From: "Daevid Vincent" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "'..: GamCo :..'" <[EMAIL

Re: [PHP-DB] Wait Statement... ?

2004-07-20 Thread John W. Holmes
Daevid Vincent wrote: Similarly, I could adjust my brute force attack to sleep() a pre-determined amount of time too ;-) Uhmmm.. how effective is a brute force attack where you can only try one combination per second? It's going to take you a while to get through that dictionary. The whole 'slee

RE: [PHP-DB] Wait Statement... ?

2004-07-20 Thread Daevid Vincent
Similarly, I could adjust my brute force attack to sleep() a pre-determined amount of time too ;-) The whole 'sleep()' idea just seems silly. I agree with Jason. Just validate and be done. A better way to stop attacks is to have a tally of failed logins if you really are that worried someone is go

[PHP-DB] pg_end_copy error using PHP with PostgreSQL

2004-07-20 Thread Robert Fitzpatrick
Using PHP 4.3.7 and PGSQL 7.4.3, I am trying to structure data and use COPY to import into a table using PHP. If I run my script, I receive this error: Warning: pg_end_copy(): Query failed: in /home/sites/site9/web/importxrf.php on line 100 I view source of the page where I have echo'd the copy d

RE: Re: [PHP-DB] DB table creation question

2004-07-20 Thread Swan, Nicole
Have you made sure that the parent table(s) is type INNODB as well? Also, in my experience, it is best to let the database be in charge of as many database functions as possible as it helps maintain the data's integrity. In other words, use foreign keys, indexing for speeding up searching, 'on

Re: [PHP-DB] howto get PK id after INSERT??

2004-07-20 Thread John W. Holmes
Vincent Jordan wrote: I think I got it correct got the most part. I am having a problem with the urlencode function I believe. On page CustomerAddNew1.php ( page than handles form data ) im using: $last_id = mysql_query("SELECT LAST_INSERT_ID() from customerinfo"); $last_id is now a Result Reso

Re: [PHP-DB] Wait Statement... ?

2004-07-20 Thread John W. Holmes
..: GamCo :.. wrote: ok, i added the sleep() function in my page. what i'm basically doing is :- i have a .php page where people log-in from. from there i send the form to another .php page that actually checks the login and registers a session with the username and password as session variables. t

RE: [PHP-DB] MySQL '!=' ???

2004-07-20 Thread VANDOORINE A RsrhCppRfaRva
Hello. The query is false, because if you loook what an OR do this give : false OR false => false true OR false => true false OR true => true true OR true => true So when your request find Argentina It is false, but when it looks the next statement and check if country is different of Mexico th

RE: [PHP-DB] MySQL '!=' ???

2004-07-20 Thread Hutchins, Richard
Tris, Instead of using != in your statement, try using <>. I looked in my copy of the MySQL Manual and it shows both != and <> for the not equal concept, but the examples given only show the <> format used. Not sure if it'll solve the problem, but it's the first thing I'd try. Rich > -Orig

[PHP-DB] MySQL '!=' ???

2004-07-20 Thread Tristan . Pretty
Hi there... I'm trying to select all records from a MySQL database, and exclude those from certain countries... I've posted a copy of an SQL statement I've got that I'm using in PHPMyADMIN. And as you can see, I've said not to pick Argentina, but there it is??? What first year mistake am I making

Re: [PHP-DB] howto get PK id after INSERT??

2004-07-20 Thread jeffrey_n_Dyke
> I think I got it correct got the most part. I am having a problem with > the urlencode function I believe. > On page CustomerAddNew1.php ( page than handles form data ) im using: > $last_id = mysql_query("SELECT LAST_INSERT_ID() from customerinfo"); > $last_id = urlencode ($last_id); Why en

Re: [PHP-DB] howto get PK id after INSERT??

2004-07-20 Thread Jason Wong
On Tuesday 20 July 2004 19:49, Vincent Jordan wrote: > I think I got it correct got the most part. I am having a problem with > the urlencode function I believe. > > On page CustomerAddNew1.php ( page than handles form data ) im using: > > $last_id = mysql_query("SELECT LAST_INSERT_ID() from custom

Re: [PHP-DB] howto get PK id after INSERT??

2004-07-20 Thread Vincent Jordan
I think I got it correct got the most part. I am having a problem with the urlencode function I believe. On page CustomerAddNew1.php ( page than handles form data ) im using: $last_id = mysql_query("SELECT LAST_INSERT_ID() from customerinfo"); $last_id = urlencode ($last_id); header("Location:

Re: [PHP-DB] Wait Statement... ?

2004-07-20 Thread Jason Wong
On Tuesday 20 July 2004 16:56, ..: GamCo :.. wrote: > ok, i added the sleep() function in my page. what i'm basically doing is :- > > i have a .php page where people log-in from. from there i send the form to > another .php page that actually checks the login and registers a session > with the use

Re: [PHP-DB] Wait Statement... ?

2004-07-20 Thread ..: GamCo :..
hhhmmm... ok, i added the sleep() function in my page. what i'm basically doing is :- i have a .php page where people log-in from. from there i send the form to another .php page that actually checks the login and registers a session with the username and password as session variables. then on th

Re: [PHP-DB] Wait Statement... ?

2004-07-20 Thread Ignatius Reilly
sleep( nb of seconds ) ; _ - Original Message - From: "..: GamCo :.." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 20, 2004 9:44 AM Subject: [PHP-DB] Wait Statement... ? > Hi all, > > I would like to add a line of code in PHP that will execute

[PHP-DB] Wait Statement... ?

2004-07-20 Thread ..: GamCo :..
Hi all, I would like to add a line of code in PHP that will execute a wait before executing the next set of code. How do i do that ? Regards, GM -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php