[PHP-DB] Form Processing

2004-10-15 Thread Ron Piggott
I would like to know if you are able to create a PHP web form that has different "SUBMIT" buttons --- or if you used the HTML command Delete Record Update And Approve For Listing For Management Basically I want the delete record to find the record in the mySQL database --- I added the auto_incr

Re: [PHP-DB] MySQL max records

2004-10-15 Thread John Holmes
ApexEleven wrote: I tried a little research on the mysql list but didn't find what I was looking for.What is the limit of a MySQL database? How many hundreds of thousands of records can a database hold before it gets too sluggish to work on a production server? Check the output from phpinfo()... I'

Re: [PHP-DB] MySQL max records

2004-10-15 Thread -{ Rene Brehmer }-
How many records it can hold before becoming too slow for practical use depends entirely of the hardware that makes up the server. Current versions of MySQL has a finite limit of 2^64 records per table, but how many billion records you can shove into it before you start seeing performance issue

[PHP-DB] MySQL max records

2004-10-15 Thread ApexEleven
I tried a little research on the mysql list but didn't find what I was looking for.What is the limit of a MySQL database? How many hundreds of thousands of records can a database hold before it gets too sluggish to work on a production server? thanks, -- <<---

Re: [PHP-DB] moving from MS Access

2004-10-15 Thread John Holmes
Perry, Matthew (Fire Marshal's Office) wrote: I have finally convinced my office manager to move from Access to MySQL. Unfortunately the office users are used to Access forms instead of web forms. I have attempted to make my web forms look as much like the Access forms they are used to but I am n

Re: [PHP-DB] Array and insert statement throws error

2004-10-15 Thread Stuart Felenstein
Hopefully these functions will explain it. I'm starting the transaction, then provided it takes with no errors it gets the commit function begin() { mysql_query("BEGIN"); } function commit() { mysql_query("COMMIT"); } function rollback() { mysql_query("ROLLBACK"); } begin(); $query = "INSERT INTO

Re: [PHP-DB] Array and insert statement throws error

2004-10-15 Thread Brent Baisley
When are you actually performing the insert into the database? The code you posted is only changing the value of the variable $query. You also need to have the database function to insert into the database. Assuming it MySQL: ... foreach(...) { $query = "INSERT INTO ..."; mysql_query($query);

Re: [PHP-DB] Array and insert statement throws error

2004-10-15 Thread Stuart Felenstein
Actually it did just loop. I need to test again. The insert statement is the the one $query = So it's after yes, but contained in the braces, like you diagram below. Stuart --- "Matt M." <[EMAIL PROTECTED]> wrote: > where is your insert statement? I am guessing it is > after your loop > >

Re: [PHP-DB] Array and insert statement throws error

2004-10-15 Thread Matt M.
where is your insert statement? I am guessing it is after your loop if ( is_array( $_SESSION['l_industry'] ) ) { foreach ( $_SESSION['l_industry'] as $p ) { $query = "INSERT INTO Profiles_Industries (ProfileID,IndID) VALUES ($LID, $p)"; /This is where y

Re: [PHP-DB] Array and insert statement throws error

2004-10-15 Thread Stuart Felenstein
Yep, I had found it shortly before. Only it's not looping. It is taking last value only. Stuart --- "Matt M." <[EMAIL PROTECTED]> wrote: > if ( is_array( $_SESSION['l_industry'] ) ) { > foreach ( $_SESSION['l_industry'] as $p ) { > $query = "INSERT INTO Profiles_Industries

Re: [PHP-DB] Array and insert statement throws error

2004-10-15 Thread Matt M.
if ( is_array( $_SESSION['l_industry'] ) ) { foreach ( $_SESSION['l_industry'] as $p ) { $query = "INSERT INTO Profiles_Industries (ProfileID,IndID) VALUES ($LID, $p)"; } //foreach ( $_SESSION['l_industry'] as $p ) } //if ( is_array( $_SESSION['l_industry'] ) ) --

Re: [PHP-DB] Array and insert statement throws error

2004-10-15 Thread Stuart Felenstein
Where would that go? Stuart --- "Matt M." <[EMAIL PROTECTED]> wrote: > > if ( is_array( $_SESSION['l_industry'] ) ) { > > foreach ( $_SESSION['l_industry'] as $p ) > { > > $query = "INSERT INTO Profiles_Industries > (ProfileID, > > IndID) > > VALUES ($LID, $p)"; > > } > > do you have a

Re: [PHP-DB] Array and insert statement throws error

2004-10-15 Thread Matt M.
> if ( is_array( $_SESSION['l_industry'] ) ) { > foreach ( $_SESSION['l_industry'] as $p ) { > $query = "INSERT INTO Profiles_Industries (ProfileID, > IndID) > VALUES ($LID, $p)"; > } do you have a } for the if statement? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

[PHP-DB] Array and insert statement throws error

2004-10-15 Thread Stuart Felenstein
Trying to get array of values into table. Each value will be part of a new record, so it's a loop. I am getting a parse error though and for further down in the code though I know this is what's causing it. Is there anything wrong with this statement ? if ( is_array( $_SESSION['l_industry'] ) )

Re: [PHP-DB] how to connect to dbase

2004-10-15 Thread Robert Twitty
Try odbtp, http://odbtp.sourceforge.net. -- bob On Fri, 15 Oct 2004, Swapan Mazumdar wrote: > Hi All, > > I am quite new to php. I have a requirement to query dbase file to > implement searching on table columns. Now I am following a basic > approach using dbase_get_record_with_names($fileHandle

[PHP-DB] moving from MS Access

2004-10-15 Thread Perry, Matthew (Fire Marshal's Office)
I have finally convinced my office manager to move from Access to MySQL. Unfortunately the office users are used to Access forms instead of web forms. I have attempted to make my web forms look as much like the Access forms they are used to but I am not a web designer. Does anyone know a good ap

Re: [PHP-DB] pdf

2004-10-15 Thread Matt M.
> i want to how i can save the data retrieved from mysql through php in pdf > format. http://www.fpdf.org/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Help: Transactions working but question / issue

2004-10-15 Thread Stuart Felenstein
Here is my situation , not sure how I should handle it. I have this multi page form, at the end I use mysql transaction to get the data into all the tables. All the tables are innodb with the exception of one. The last page has one field which takes a copy/paste of a document, so it's a text area

Re: [PHP-DB] Help: Transactions not working

2004-10-15 Thread Stuart Felenstein
John, Big thank you! for your help. I had been trying out the mysql_insert_id and was not having luck. It's working great (with just a few more bumps to get over). --- John Holmes <[EMAIL PROTECTED]> wrote: > Stuart Felenstein wrote: > > > But - I want to confirm, am I still using > transacti

RE: [PHP-DB] pdf

2004-10-15 Thread Bastien Koert
www.fpdf.org bastien From: "balwantsingh" <[EMAIL PROTECTED]> Reply-To: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Subject: [PHP-DB] pdf Date: Fri, 15 Oct 2004 13:53:00 +0530 hi all, i want to how i can save the data retrieved from mysql through php in pdf format. thanks for your help in advance.

RE: [PHP-DB] How to optimize select of random record in DB ?

2004-10-15 Thread Bastien Koert
skip the two step process and use RAND in the sql statement SELECT * FROM table1, table2 WHERE a=b AND c bastien From: -{ Rene Brehmer }- <[EMAIL PROTECTED]> To: [EMAIL PROTECTED],[EMAIL PROTECTED] Subject: [PHP-DB] How to optimize select of random record in DB ? Date: Fri, 15 Oct 2004 07:41:44 +02

Re: [PHP-DB] how to connect to dbase

2004-10-15 Thread Jason Wong
On Friday 15 October 2004 19:11, Swapan Mazumdar wrote: > I can't believe this, my problem doesn't attract any attention. > But I am quite sure that everybody else besides me has more experience > than me in this specific field. > Anyone pl, is my question absurd or just impossible. I may be wrong

Re: [PHP-DB] Help: Transactions not working

2004-10-15 Thread Stuart Felenstein
That made a world of difference! :) Thank you. But - I want to confirm, am I still using transactions even though I'm issuing individual query calls for each insert. And, if I can ask another question to the list : In this line (from the second insert) VALUES (null, LAST_INSERT_ID(), ..)";

RE: [PHP-DB] how to connect to dbase

2004-10-15 Thread Swapan Mazumdar
I can't believe this, my problem doesn't attract any attention. But I am quite sure that everybody else besides me has more experience than me in this specific field. Anyone pl, is my question absurd or just impossible. -Original Message- From: Swapan Mazumdar [mailto:[EMAIL PROTECTED] Se

Re: [PHP-DB] pdf

2004-10-15 Thread mohamad AKL
check this - Original Message - From: "balwantsingh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 15, 2004 11:23 AM Subject: [PHP-DB] pdf > hi all, > > i want to how i can save the data retrieved from mysql through php in pdf > format. > > thanks for your help in adv

Re: [PHP-DB] Help: Transactions not working

2004-10-15 Thread John Holmes
Stuart Felenstein wrote: If you see the code I have the begin , then the $query follows. With both statements present, only the second one does the insert. If I // or remove the second, the first one takes. Am I missing something here ? Yep... you're missing a mysql_query() call for each query.

[PHP-DB] Help: Transactions not working

2004-10-15 Thread Stuart Felenstein
If you see the code I have the begin , then the $query follows. With both statements present, only the second one does the insert. If I // or remove the second, the first one takes. Am I missing something here ? Stuart Code: function begin() { mysql_query("BEGIN"); } function commit() { mysq

Re: [PHP-DB] Help: Transactions not working

2004-10-15 Thread John Holmes
Stuart Felenstein wrote: But - I want to confirm, am I still using transactions even though I'm issuing individual query calls for each insert. Yes, that's the idea. Everthing between BEGIN and COMMIT/ROLLBACK is the transaction. In this line (from the second insert) VALUES (null, LAST_INSERT_ID(

[PHP-DB] pdf

2004-10-15 Thread balwantsingh
hi all, i want to how i can save the data retrieved from mysql through php in pdf format. thanks for your help in advance. with best wishes balwant -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Converting Date for mysql

2004-10-15 Thread Stuart Felenstein
Yes, my apologies to the list! Stuart --- David Robley <[EMAIL PROTECTED]> wrote: > May I suggest that as well as echoing mysql_error() > you also echo your > query; that way you can see _exactly_ what is being > passed to mysql and you > can resolve problems like this simply and without > resor

Re: [PHP-DB] Converting Date for mysql

2004-10-15 Thread David Robley
On Fri, 15 Oct 2004 17:26, Stuart Felenstein wrote: > See below: > --- John Holmes <[EMAIL PROTECTED]> wrote: > >> Are you sure it's the date that's causing the >> rejection? What does >> mysql_error() say? > > No, I'm not sure. At first the date was being > accepted but "wrong" in the database

Re: [PHP-DB] Converting Date for mysql

2004-10-15 Thread Stuart Felenstein
See below: --- John Holmes <[EMAIL PROTECTED]> wrote: > Are you sure it's the date that's causing the > rejection? What does > mysql_error() say? No, I'm not sure. At first the date was being accepted but "wrong" in the database. It was setting it to 1/1/2000. Someone suggested I add '' aroun

[PHP-DB] how to connect to dbase

2004-10-15 Thread Swapan Mazumdar
Hi All, I am quite new to php. I have a requirement to query dbase file to implement searching on table columns. Now I am following a basic approach using dbase_get_record_with_names($fileHandler, $iterationIndex). This seems to be a rudimentary approach and has performance bottleneck. For the pur

[PHP-DB] Re: [PHP] How to optimize select of random record in DB ?

2004-10-15 Thread Gareth Williams
What about in MySQL: SELECT personID from persons ORDER BY RAND(NOW()) LIMIT 1 If the table is large, then the following might be better: LOCK TABLES foo READ; SELECT FLOOR(RAND() * COUNT(*)) AS rand_row FROM foo; SELECT * FROM foo LIMIT $rand_row, 1; UNLOCK TABLES; There's a whole discussion on it