[PHP-DB] PHP and Oracle
Hi, How would I install PHP with Oracle support if Oracle is on another machine, not in the web server machine? Thanks, Lester - Lester June Cabrera Chief Web Programmer I-Quest Corporation Tel: (632) 867 8460 local 32 Fax: (63 2) 867 8077 E-mail: [EMAIL PROTECTED] Visit the most comprehensive on-line business travel resource at http://www.worldroom.com Successful events start here. Visit http://www.worldroomevents.com . The one-stop online exchange for event planners and suppliers to the MICE industry. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Updating multiple forms
How do I update data into multiple forms? Thanks in advance.. Shahmat
Re: [PHP-DB] Updating multiple forms
Hi, What do you mean by updating data into multiple forms? Do you mean displaying data in multiple HTML forms? Lester At 04:53 PM 4/18/01 +0800, Shahmat Dahlan wrote: How do I update data into multiple forms? Thanks in advance.. Shahmat -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Updating multiple forms
Apologies... Lemme rephrase my question, How do I update data into multiple tables in MySQL? Shahmat Lester June Cabrera wrote: Hi, What do you mean by updating data into multiple forms? Do you mean displaying data in multiple HTML forms? Lester At 04:53 PM 4/18/01 +0800, Shahmat Dahlan wrote: How do I update data into multiple forms? Thanks in advance.. Shahmat -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Updating multiple forms
Yes, this is only applicable if I only have one table. What if I need to update multiple tables? Lester June Cabrera wrote: I guess you need to use the UPDATE command UPDATE tablename SET column1 = 'some value' WHEREcolumn2 = 'another value'; Did I get what you mean? Lester At 05:02 PM 4/18/01 +0800, you wrote: Apologies... Lemme rephrase my question, How do I update data into multiple tables in MySQL? Shahmat Lester June Cabrera wrote: Hi, What do you mean by updating data into multiple forms? Do you mean displaying data in multiple HTML forms? Lester At 04:53 PM 4/18/01 +0800, Shahmat Dahlan wrote: How do I update data into multiple forms? Thanks in advance.. Shahmat -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Updating multiple forms
On 18 Apr 2001, at 17:27, Shahmat Dahlan wrote: Yes, this is only applicable if I only have one table. What if I need to update multiple tables? Shamat, it seems we need some more info to understand your needs. What precisely are you trying to do? /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ Fabrizio Ermini Alternate E-mail: C.so Umberto, 7 [EMAIL PROTECTED] loc. Meleto Valdarno Mail on GSM: (keep it short!) 52020 Cavriglia (AR) [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Updating multiple forms
Off the top of my head, and it's 3am local so take this with a grain of salt, but I think that this will work... Update Table1, Table2 SET Table1.column1 = 'blah', Table2.column1='foo' WHERE Table1.ID = x AND Table2.ID = y 'Luck -Szii - Original Message - From: Lester June Cabrera [EMAIL PROTECTED] To: Shahmat Dahlan [EMAIL PROTECTED]; PHP-DB [EMAIL PROTECTED] Sent: Wednesday, April 18, 2001 2:29 AM Subject: Re: [PHP-DB] Updating multiple forms Multiple tables with different fields? Hmm... I don't know of any shortcut in doing it. At 05:27 PM 4/18/01 +0800, Shahmat Dahlan wrote: Yes, this is only applicable if I only have one table. What if I need to update multiple tables? Lester June Cabrera wrote: I guess you need to use the UPDATE command UPDATE tablename SET column1 = 'some value' WHEREcolumn2 = 'another value'; Did I get what you mean? Lester At 05:02 PM 4/18/01 +0800, you wrote: Apologies... Lemme rephrase my question, How do I update data into multiple tables in MySQL? Shahmat Lester June Cabrera wrote: Hi, What do you mean by updating data into multiple forms? Do you mean displaying data in multiple HTML forms? Lester At 04:53 PM 4/18/01 +0800, Shahmat Dahlan wrote: How do I update data into multiple forms? Thanks in advance.. Shahmat -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Convertin Asp to Php
Hi I got to convert a asp site white database conections to a mysql but I hav to convert it to Php with conections to Mysql my question is if there is a simple way to do this or if the pages has to be rewriten (for an example a converter program) and is there a correspondence to ADO between mysql (well the odbc) and php as there is between odbc and asp Thanks Tobbe
RE: [PHP-DB] Convertin Asp to Php
Hi Tobbe, I haven't used it and I am only a beginner at this stuff, but there is a product called Code Charge www.codecharge.com. It is available for download for a trial period. It may be useful. I don't know of any other possibility, other than re-writing the logic. Although from using PHP and ASP a small bit I am sure there will be much less lines of code with PHP - I find it great and coming back to ASP quite cumbersome!! All the best Lisa -Original Message- From: Torbjrn Samuelsson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 18, 2001 11:48 AM To: PHP-DB Subject: [PHP-DB] Convertin Asp to Php Hi I got to convert a asp site white database conections to a mysql but I hav to convert it to Php with conections to Mysql my question is if there is a simple way to do this or if the pages has to be rewriten (for an example a converter program) and is there a correspondence to ADO between mysql (well the odbc) and php as there is between odbc and asp Thanks Tobbe
[PHP-DB] Concurrent update to database (PostgreSQL or MySQL) ??
Hi, How can I avoid two or more users to update the same record at the same time ? Ideally, I would like to lock the record when a user open it for modification. So if another user try to open the same record he'll be warned or get record values as read only. Is this possible and how to do it with PHP ?? How can I know that the user that has locked the record has finished with it, if he never commits his changes ? Is there an FAQ about this ? Regards, Nicolas -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] building database advise
I have a database project, historic building materials... I've designed 4 Tables like this (there are more fields which I didn't listed here): table products - primary key(productid) - product description ... table category - primary key(categoryid) - category description table subcategory - primary key (Subcatid) - subcatdescription table subtype - primary key (suptypeid) - subtype description now I like to join those tables. For example I got the product of a single door (there are other doors which are double doors. This product belongs to subtype single doors, which than belongs to the subcategory doors and category historic building material out of wood. My aim is to have a hyperlink which shows me the categorys if click on it it shows me the subcategorys and than the subtype and than the products which belong to all this. So if I now create another table called for example table Ids - productID - categoryID - subcatID - subtypeID will I be able to join those together and get all I want to achive building it like this? Or do I have to many tables to join together? Also the Id's make up my product code say for example category b.m.o of wood makes number 10 (20, 30, 40 for others) subcategoryid will be 1 for doors (2,3,4 there after) subtype also 1 (2,3,4) and than the products will be 1, 2 , 3 etc. My logic doesn't let me think of any other way. So if anyone has a good suggestion on how to go about this please let me know. Thank you so much if you find the time to help me out here. Regards Petra [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] MySQL Question
On Tue, Apr 17, 2001 at 05:52:53PM -0400, Peter J. Krawetzky wrote: How do you move the database files to another location in MySQL? I am running Redhat 7.1 with MySQL version 3.23.33. You ask the appropriate list @ [EMAIL PROTECTED] Of course by the time you do so, you have already searched the archives @ http://www.mysql.com/documentation/searchlists.html As well as simply looking on the site @ http://www.mysql.com -- Jason Stechschulte [EMAIL PROTECTED] -- Randal said it would be tough to do in sed. He didn't say he didn't understand sed. Randal understands sed quite well. Which is why he uses Perl. :-) -- Larry Wall in [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Concurrent update to database (PostgreSQL or MySQL) ??
This is a database, not a PHP question. Different databases have different locking/buffering schemes. So which are you using, and what do the documents say about locking? Do they lock records or pages? Generally you never attempt to lock a record until you are ready to write to it. In general terms, if this is a record that would be hit by a lot of users, here's a fairly foolproof method: Establish a loop which checks to see if the record is locked. This avoids failure of attempting to lock an already locked record. You may have to provide for timing out if the record is never freed. When record becomes free, lock it. Execute your write. Unlock the record. On the other hand. Hope this helps - Miles PS You almost never lock a record for a read. At 01:47 PM 4/18/01 +0200, Nicolas Guilhot wrote: Hi, How can I avoid two or more users to update the same record at the same time ? Ideally, I would like to lock the record when a user open it for modification. So if another user try to open the same record he'll be warned or get record values as read only. Is this possible and how to do it with PHP ?? How can I know that the user that has locked the record has finished with it, if he never commits his changes ? Is there an FAQ about this ? Regards, Nicolas -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Concurrent update to database (PostgreSQL or MySQL) ??
On 18 Apr 2001, at 13:47, Nicolas Guilhot wrote: Don't want to start another religion war, but... Hi, How can I avoid two or more users to update the same record at the same time ? Ideally, I would like to lock the record when a user open it for modification. So if another user try to open the same record he'll be warned or get record values as read only. Is this possible and how to do it with PHP ?? How can I know that the user that has locked the record has finished with it, if he never commits his changes ? Is there an FAQ about this ? Rather than a FAQ, you should find some good textbook on cuncurrent programming. The problem of concurrent updates of data is far too large to be tackled with a brief doc (and even less with a mail, I'm afraid). But to be short: Generally, Every DBMS out there can guarantee you that there will be no 2 users trying to update the same data together (i.e. querys are serialized). When it comes to multiple updates, however, or updates that touch different tables the problem gets harder, and the doubt you put in the subject can comport big difference in the way to handle it. In the MySQL paradigm, it's up to the programmer to guarantee data integrity at application level. In PostgreSQL (and in the rest of the DBMS world) paradigm, this work is still left to the DBMS system, thru isolated transactions. It's up to you to decide which way to go... /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ Fabrizio Ermini Alternate E-mail: C.so Umberto, 7 [EMAIL PROTECTED] loc. Meleto Valdarno Mail on GSM: (keep it short!) 52020 Cavriglia (AR) [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Updating multiple forms
Basically you write multiple query statements. Like so: $query_updatetable1 = "UPDATE table1 SET fieldname WHERE fieldname = x"; $result_updatetable1 = mysql_query($query_updatetable1); $query_updatetable2 = "UPDATE table2 SET fieldname WHERE fieldname = y"; $result_updatetable2 = mysql_query($query_updatetable2); $query_updatetable3 = "UPDATE table3 SET fieldname WHERE fieldname = z"; $result_updatetable3 = mysql_query($query_updatetable3); That will do it, because I update multiple tables on my site. Steven Samuel http://www.sohh.com -Original Message- From: Shahmat Dahlan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 18, 2001 2:27 AM To: Lester June Cabrera; PHP-DB Subject: Re: [PHP-DB] Updating multiple forms Yes, this is only applicable if I only have one table. What if I need to update multiple tables? Lester June Cabrera wrote: I guess you need to use the UPDATE command UPDATE tablename SET column1 = 'some value' WHEREcolumn2 = 'another value'; Did I get what you mean? Lester At 05:02 PM 4/18/01 +0800, you wrote: Apologies... Lemme rephrase my question, How do I update data into multiple tables in MySQL? Shahmat Lester June Cabrera wrote: Hi, What do you mean by updating data into multiple forms? Do you mean displaying data in multiple HTML forms? Lester At 04:53 PM 4/18/01 +0800, Shahmat Dahlan wrote: How do I update data into multiple forms? Thanks in advance.. Shahmat -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] PHP and Oracle
At 03:43 PM 4/18/01 +0800, Lester June Cabrera wrote: How would I install PHP with Oracle support if Oracle is on another machine, not in the web server machine? 1. Install the Oracle Net8 client on your web server... 2. Configure the Oracle Net8 client on your web server... 3. Compile PHP with OCI8 support... Now, the next thing that usually happens is that I'll get an email asking me "where do I get the Oracle Net8 client?" then, "how do I install the Net8 client?" still later, I'll get another email asking "how do I configure the Net8 client?" then... So, to avoid all that... The Oracle Net8 client is available from Oracle Corporation. There is a client available for just about every platform imaginable. Call Oracle support with your CSI number and they'll gladly ship whichever client platform software you need for free. Sometimes, the client software isn't available as a stand-alone disk, and they'll send you an entire Oracle 8i installation set - fear not, it contains the Net8 client for that architecture. To configure the Net8 client, follow the directions provided with the installation. Basically, you need to set up your tnsnames.ora file to locate the oracle server. There are utilities installed with the client to help you configure and test it. It probably wouldn't be a bad idea for you to *also* install the SQL*Plus software, which operates through the Net8 interface as well... - Brian - Brian S. Dunworth Sr. Software Development Engineer Oracle Database Administrator The Printing House, Ltd. (850) 875-1500 x225 [EMAIL PROTECTED] - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Best non-tackified grip enhancer for golfers+
BDY.RTF -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] hide passing value
I want to hide the values being passed between forms like password. For that i tried GET and POST but wouldn't work. Any other Ideas. -Regards -- The secret of the universe is @*!'^#+ NO CARRIER ___ _ _ _ |_|_||_||_||\/||_|| \ _|| || || \| || ||_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] HTTP1.0/404 Not found
I want to know now to avoid displaying HTTP/1.0 404 Not found page. Despite the fact that i want say that everyone to go to index.php page on any non existing URL. pls tell me where to do the exact and how?. Add index.php to your httpd.conf think it's called directoryindex.. it says something like DirectoryIndex index.html index.htm you need to add index.php Thats all. Bye, B. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] HTTP1.0/404 Not found
on 4/18/01 10:41 AM, Sharmad Naik at [EMAIL PROTECTED] wrote: I want to know now to avoid displaying HTTP/1.0 404 Not found page. Despite the fact that i want say that everyone to go to index.php page on any non existing URL. pls tell me where to do the exact and how?. Pls help me Sorry, you should really subscribe to the PHP General list to post non-php/database questions. You can do so here: http://php.net/support.php That page also has information about news groups and list archives. Sincerely, Paul Burney http://paulburney.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] hide passing value
Ok fair play - What about using sessions then: ?php session_start(); session_register('password') ? simply place the code between the ?php and ? at the top of each page you wish the password to be available on. Hope that helps... Russ #---# "Believe nothing - consider everything" "Web Developers do it on-the-fly." Russ Michell Anglia Polytechnic University Webteam www.apu.ac.uk/webteam [EMAIL PROTECTED] +44 (0)1223 363271 ext 2331 www.theruss.com #---# -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Concurrent update to database (PostgreSQL or MySQL) ??
As others have mentioned, this is a tricky thing to do. What others haven't mentioned is a way to do it. Let's say you just showed the update form to two users. It contains the fields that they are allowed to update and the values in those fields had been retreived from the database. Both users see a form like this: Today's High Temperature City: Detroit Temp (degrees F): 47 ( Submit ) The city field is not available for update (presumably the editor/user selected it off of a previous menu), and their task is to update today's high temperature for Detroit. One of the editors has information that the high temperature reached 49 degrees F, and the other editor has information that the high temperature has reached 50. (Perhaps one of the editors is overworked and hadn't gotten to enter the new high, or the temperature is changing very quickly.) So one of the people enter 50 and the other enters 49. Both hit submit. What needs to be done right at that moment to protect it from changing the value to 50 degrees (which is the correct, most recent, data) and then immediately changing the value to 49 degrees (which is now out of date)? Basically, you have to pass the original value to the script that is the ACTION of the HTML form. This way, you have the original value that may have been updated and the new value. The first thing the HTML form's ACTION script has to do is get the record from the database again. (Use SELECT ... FOR UPDATE if available, so the RDBMS might lock the row.) If the value you get from the SELECT is the same as the original value, go ahead and run the UPDATE to change the value to the new value. If not, then generate and display a screen telling the editor that the value has been updated by someone else...you can show the value and ask if they want to proceed with the update, but that's all up to you and/or your interface designers. This is all similar to how folks design old fashioned screen-oriented database systems (like with CICS). Good luck, Doug At 01:47 PM 4/18/01 +0200, Nicolas Guilhot wrote: Hi, How can I avoid two or more users to update the same record at the same time ? Ideally, I would like to lock the record when a user open it for modification. So if another user try to open the same record he'll be warned or get record values as read only. Is this possible and how to do it with PHP ?? How can I know that the user that has locked the record has finished with it, if he never commits his changes ? Is there an FAQ about this ? Regards, Nicolas -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] PHPNuke 4 error. Got any clues?
Ok.. I recently uploaded all the files, followed the readme exactly, set permissions, uploaded the mySQL file, created the database, and all necessary steps to my FreeBSD server. When I goto the admin.php, I get this error: "Fatal error: Call to undefined function: translate() in /home/websites/www/test/themes/ExtraLite/header.php on line 10" This is where I got PHPNuke: http://www.phpnuke.org/ If you have any suggestions, It would be greatly appreciated. thanks! :) __ FREE Personalized Email at Mail.com Sign up at http://www.mail.com/?sr=signup -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] PHPNuke 4 error. Got any clues?
Hi Brian, I've not worked with PHPNuke, but translate() is not a PHP native function (I don't believe...) so find where it's being defined in the PHPNuke distro and ensure that that file is being included/required in admin.php or before. HTH Best regards, Andrew -- Andrew Hill - OpenLink Software Director Technology Evangelism Universal Data Access Integration http://www.openlinksw.com Ok.. I recently uploaded all the files, followed the readme exactly, set permissions, uploaded the mySQL file, created the database, and all necessary steps to my FreeBSD server. When I goto the admin.php, I get this error: "Fatal error: Call to undefined function: translate() in /home/websites/www/test/themes/ExtraLite/header.php on line 10" -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] PHPNuke 4 error. Got any clues?
At 03:55 PM 4/18/2001 -0400, Brian Tegtmeier wrote: If you have any suggestions, It would be greatly appreciated. thanks! :) First, do not use PHPNuke. It has a shaky codebase which would require a complete rewrite to fix up. I have used it personally and regret it as it is a total pain to modify and was not designed with security or extensibility in mind. If you must use it, chop out the file manager functions since there will undoubtedly be more hacks for this app over time. Also, do not use headlines from external sites as this can be used to inject PHP code into your site. If you absolutely must use it, it sounds like you are missing a necessary file since translate() is an internal function. This suggests that an include statement is silently failing somewhere due to a mangled path or filename. Cheers, Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Web based adminisration
Are there any other web based administration tools for mysql written in php besides phpMyAdmin?Links? Mike P [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Web based adminisration
I've written a Content Publishing Tool for my site. http://www.sohh.com Steven -Original Message- From: Mike [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 18, 2001 1:48 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Web based adminisration Are there any other web based administration tools for mysql written in php besides phpMyAdmin?Links? Mike P [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] How to redirect a user to main page once I capture his info in a form?
Hi all, I have a simple form where I capture the information from users. Once the information is captured, I'd like to send the users the the main page. I already tried the header command but I get an error like this: Warning: Cannot add header information - headers already sent by (output started at page.php:42) in page.php on line 45 Any ideas?
Re: [PHP-DB] How to redirect a user to main page once I capture his info in a form?
At 02:03 PM 4/18/2001 -0700, Hector M Banda wrote: Warning: Cannot add header information - headers already sent by (output started at page.php:42) in page.php on line 45 What's at line 42 of page.php? Cheers - Island Net AMT Solutions Group Inc. Telephone: 250 383-0096 1412 Quadra Toll Free:1 800 331-3055 Victoria, B.C. Fax:250 383-6698 V8W 2L1 E-Mail:[EMAIL PROTECTED] Canada WWW: http://www.islandnet.com/ - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
AW: [PHP-DB] Concurrent update to database (PostgreSQL or MySQL) ??
Another way is to keep another unique value inside the table to be updated and remember it. When needed, I add a second unique column to the table (in my case a char(64)) which is filled with the current timestamp and some md5 checksum. I select this value before the update, pass it along with the HTML form, and, before updating, I re-select the row to be updated and compare the keys. If the comparision fails, the user is presented a warning message, else I do the update (the user's data and a new generated stamp-value) with the primary key _and_ the original stamp in the where clause. Then I check if my new stamp made it to the table, or present another warning. A sample: Table atable: id int not null primary key stamp char(64) not null unique avalue int select id,stamp,avalue from atable where id=1 (select data for update) build html form with "id" and "stamp" as hidden values select stamp from atable where id=the_id if stamp(form) != stamp(db) error (e.g. start from beginning) else construct new_stamp update atable set avalue=new,stamp=new_stamp where id=the_id AND stamp=old_stamp select stamp from atable where id=the_id if stamp(db) != new_stamp error endif endif It's a bit of work, but it had never let me down. Thomas id INT NOT NULL AUTO_INCREMENT PRIMARY KEY Is what I use in the WHERE clause to update data ts CHAR(32) NOT NULL UNIQUE I -Ursprngliche Nachricht- Von: Doug Semig [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 18. April 2001 20:48 An: [EMAIL PROTECTED] Betreff: Re: [PHP-DB] Concurrent update to database (PostgreSQL or MySQL) ?? As others have mentioned, this is a tricky thing to do. What others haven't mentioned is a way to do it. Let's say you just showed the update form to two users. It contains the fields that they are allowed to update and the values in those fields had been retreived from the database. Both users see a form like this: Today's High Temperature City: Detroit Temp (degrees F): 47 ( Submit ) The city field is not available for update (presumably the editor/user selected it off of a previous menu), and their task is to update today's high temperature for Detroit. One of the editors has information that the high temperature reached 49 degrees F, and the other editor has information that the high temperature has reached 50. (Perhaps one of the editors is overworked and hadn't gotten to enter the new high, or the temperature is changing very quickly.) So one of the people enter 50 and the other enters 49. Both hit submit. What needs to be done right at that moment to protect it from changing the value to 50 degrees (which is the correct, most recent, data) and then immediately changing the value to 49 degrees (which is now out of date)? Basically, you have to pass the original value to the script that is the ACTION of the HTML form. This way, you have the original value that may have been updated and the new value. The first thing the HTML form's ACTION script has to do is get the record from the database again. (Use SELECT ... FOR UPDATE if available, so the RDBMS might lock the row.) If the value you get from the SELECT is the same as the original value, go ahead and run the UPDATE to change the value to the new value. If not, then generate and display a screen telling the editor that the value has been updated by someone else...you can show the value and ask if they want to proceed with the update, but that's all up to you and/or your interface designers. This is all similar to how folks design old fashioned screen-oriented database systems (like with CICS). Good luck, Doug At 01:47 PM 4/18/01 +0200, Nicolas Guilhot wrote: Hi, How can I avoid two or more users to update the same record at the same time ? Ideally, I would like to lock the record when a user open it for modification. So if another user try to open the same record he'll be warned or get record values as read only. Is this possible and how to do it with PHP ?? How can I know that the user that has locked the record has finished with it, if he never commits his changes ? Is there an FAQ about this ? Regards, Nicolas -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] How to redirect a user to main page once I capture his info in a form?
header("location: http://www.need-info.com"); - Original Message - From: "Ron Brogden" [EMAIL PROTECTED] To: "Hector M Banda" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, April 18, 2001 2:08 PM Subject: Re: [PHP-DB] How to redirect a user to main page once I capture his info in a form? At 02:03 PM 4/18/2001 -0700, Hector M Banda wrote: Warning: Cannot add header information - headers already sent by (output started at page.php:42) in page.php on line 45 What's at line 42 of page.php? Cheers -- --- Island Net AMT Solutions Group Inc. Telephone: 250 383-0096 1412 Quadra Toll Free:1 800 331-3055 Victoria, B.C. Fax:250 383-6698 V8W 2L1 E-Mail: [EMAIL PROTECTED] Canada WWW: http://www.islandnet.com/ -- --- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] How to redirect a user to main page once I capturehisinfo in a form?
Try using just HTML htmlheadtitleLogging in.../title meta http-equiv="refresh" content="0;URL=display.php?action=home"/head body/body/html Hope this helps, Morgan Tocker. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] How to redirect a user to main page once I capture his info in a form?
Hi, you have output in line 42. any html stuff. You have to send haeder information before any output. If you capture the info via a form you can make a seperate capturing script (not $PHP_SELF) to enter the info into a DB and at the end of this -after successfully inserting the data- redirect the user to the page of needs. Johannes ""Hector M Banda"" [EMAIL PROTECTED] schrieb im Newsbeitrag 004801c0c84a$fee799a0$[EMAIL PROTECTED]">news:004801c0c84a$fee799a0$[EMAIL PROTECTED]... Hi all, I have a simple form where I capture the information from users. Once the information is captured, I'd like to send the users the the main page. I already tried the header command but I get an error like this: Warning: Cannot add header information - headers already sent by (output started at page.php:42) in page.php on line 45 Any ideas? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] inserting a timestamp
hey all, I am having a hell of a time getting a timestamp to insert correctly. it keeps coming up 00 here's what i have $date_avail = mktime (0,0,0,$month,$day,$year); $avail = date("F j, Y", $date_avail); echo "Date Available: $avail"; this works fine and displays the date correctly My insert statement is fine [no mistakes] I insert $date_avail into the date_avail field which is type TIMESTAMP - when i inserti get a 0 If i change the field type of date_avail to VARCHAR it inserts correctly and i can reference it as a timestamp and display correctly [a mysql db] can anyone help, i guess that using varchar is fine, but i have wasted a half a day and am a little pissed about this. I noticed that even when i try to change the date_avail field with phpmyadmin to NOT NULL it changes to NULL - i think that this is the prob, but i do not know thanks much olinux
Re: [PHP-DB] inserting a timestamp
Olinux, From the Mysql Manual As a string with no delimiters in either 'MMDDHHMMSS' or 'YYMMDDHHMMSS' format, provided that the string makes sense as a date. For example, '19970523091528' and '970523091528' are interpreted as '1997-05-23 09:15:28', but '971122129015' is illegal (it has a nonsensical minute part) and becomes '-00-00 00:00:00' rwj - Original Message - From: "olinux" [EMAIL PROTECTED] To: "PHP-DB" [EMAIL PROTECTED] Sent: Thursday, April 19, 2001 12:12 AM Subject: [PHP-DB] inserting a timestamp hey all, I am having a hell of a time getting a timestamp to insert correctly. it keeps coming up 00 here's what i have $date_avail = mktime (0,0,0,$month,$day,$year); $avail = date("F j, Y", $date_avail); echo "Date Available: $avail"; this works fine and displays the date correctly My insert statement is fine [no mistakes] I insert $date_avail into the date_avail field which is type TIMESTAMP - when i inserti get a 0 If i change the field type of date_avail to VARCHAR it inserts correctly and i can reference it as a timestamp and display correctly [a mysql db] can anyone help, i guess that using varchar is fine, but i have wasted a half a day and am a little pissed about this. I noticed that even when i try to change the date_avail field with phpmyadmin to NOT NULL it changes to NULL - i think that this is the prob, but i do not know thanks much olinux -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Error Msg: Wrong data type when performing extract()
$sqlstmt ="SELECT stock_in.id, equip.equip_type, "; $sqlstmt.="equip.brand, equip.model, "; $sqlstmt.="vendor.name, stock_in.po_no, "; $sqlstmt.="stock_in.vendor_sales_no, stock_in.cust_po_no, "; $sqlstmt.="stock_in.serial, stock_in.warranty, stock_in.date_received, "; $sqlstmt.="stock_in.remark, stock_in.timestamp "; $sqlstmt.="FROM stock_in, equip, vendor "; $sqlstmt.="WHERE equip.id=equip_id and vendor.id=vendor_id and equip.id='$id' "; $sqlstmt.="ORDER BY equip.id ASC"; # print $sqlstmt; $result=mysql_query($sqlstmt); # print $result; $row=mysql_fetch_array($result) extract($row); If I do the above, I get the results below: Warning: Wrong datatype in call to extract() in E:\winnt\temp\stock_in.php on line 39 I've went through the query, and it seems alright. It worked previously, now all of a sudden it doesn't work anymore.. Can anyone help me out. Thanks in advance. Shahmat
[PHP-DB] MySql won't connect
I know that the pages that I am using worked. I created them, then had to reload my OS. I saved everything before erasing the HD. I have restored the files but now I get a warning message that says MySQL Connection Failed: Can't connect to local MySQL server through socket The mysql.sock does exist, there is also a pid file there pointing to the current running occurance of MySQL. I have root set up with a password and I am able to connect to MySQL from a promopt. Below is the offending code. I think there is something that I missed when I set things up. FYI: I am running RH7.0 and Apache you are welcome to check out this page: http://24.163.168.40/phpinfo.php $link = mysql_connect("localhost", "root", "secret") or die("can't connect"); Last, I did look for the php-mysql module and it is on the system. Thanks John -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] MySQL transactions?
a common question. This might help http://www.mysql.com/documentation/mysql/bychapter/manual_Compatibility.html #Missing_Transactions -- Regards, Gary "SuperID" Huntress === FreeSQL.org offering free database hosting to developers Visit http://www.freesql.org "Bas Cancrinus" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, Is it possible to define a set of mysql function-calls as a transaction that commits if no error occurs and rolls back otherwise? Thanks in advance, Bas -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Fw: [PHP-DB] MySql won't connect
Your direct e-mail has problems too. - Original Message - From: "Dan Anderson" [EMAIL PROTECTED] To: "johndmiller" [EMAIL PROTECTED] Sent: Wednesday, April 18, 2001 11:36 PM Subject: Re: [PHP-DB] MySql won't connect Not a php expert by any means, but I get this when I use the "wrong" ip/name from MySQL's perspective. My stock MySQL does not allow localhost, I need FQDN in connect. I suspect that if I looked into this more I would find that it is just a rights issue and a quick GRANT or something would fix me. Dan - Original Message - From: "johndmiller" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 18, 2001 10:12 PM Subject: [PHP-DB] MySql won't connect I know that the pages that I am using worked. I created them, then had to reload my OS. I saved everything before erasing the HD. I have restored the files but now I get a warning message that says MySQL Connection Failed: Can't connect to local MySQL server through socket The mysql.sock does exist, there is also a pid file there pointing to the current running occurance of MySQL. I have root set up with a password and I am able to connect to MySQL from a promopt. Below is the offending code. I think there is something that I missed when I set things up. FYI: I am running RH7.0 and Apache you are welcome to check out this page: http://24.163.168.40/phpinfo.php $link = mysql_connect("localhost", "root", "secret") or die("can't connect"); Last, I did look for the php-mysql module and it is on the system. Thanks John -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Error Msg: Wrong data type when performing extract()
In article [EMAIL PROTECTED], [EMAIL PROTECTED] ("Shahmat Dahlan") wrote: $result=mysql_query($sqlstmt); # print $result; $row=mysql_fetch_array($result) extract($row); If I do the above, I get the results below: Warning: Wrong datatype in call to extract() in E:\winnt\temp\stock_in.php on line 39 I've went through the query, and it seems alright. It worked previously, now all of a sudden it doesn't work anymore.. Can anyone help me out. Since apparently $row is not an array, I'd guess that mysql_fetch_array has nothing to fetch (i.e. no row was returned by the query). Two things to get into the habit of doing: 1) check that the query was valid. For example: $result=mysql_query($sqlstmt) or die("Query error: " . mysql_error()); 2) check that the query returned 1 or more rows. For example: if(mysql_num_rows()) { $row=mysql_fetch_array($result) or die("Row fetching error: " . mysql_error()); //BTW, you were missing a semi-colon on this line ... } -- CC -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] MySQL transactions?
The newest MySQL code has transactions via their implementation of Sleepcat's BDB tables. If you use BDB tables instead of MyISAM you can do transactions. Check the syntax on CREATE TABLE for details on how to create BDB tables. 'Luck -Szii - Original Message - From: Gary Huntress [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 18, 2001 8:36 PM Subject: Re: [PHP-DB] MySQL transactions? a common question. This might help http://www.mysql.com/documentation/mysql/bychapter/manual_Compatibility.html #Missing_Transactions -- Regards, Gary "SuperID" Huntress === FreeSQL.org offering free database hosting to developers Visit http://www.freesql.org "Bas Cancrinus" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, Is it possible to define a set of mysql function-calls as a transaction that commits if no error occurs and rolls back otherwise? Thanks in advance, Bas -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]