Re: [PHP-DB] dlls and inis.Help.
try this extension_dir = enable_dn=on extension=e:\apps\php\extensions\php_interbase.dll fyi, I'm running on Win NT 4, with apache 1.3.20 and php 4.06. regards DL Neil wrote: Anyone got a clue for this piece of bad luck? I'm on win2k pro + IIS5 +php4.0.6 cgi installation. It works fine untill I try to load php_interbase.dll extension and this is how it goes: Unable to load dynamic library '...' - The specified procedure could not be found. Three points stand for: ./ (this one is by default), d:\php, d:\php\extensions, d:\winnt and d:\winnt\system32, wherever I choose to put the dll. Those folders where declared in the above fashion and with/without quotes, with slash/backslash. ( other *.ini-s, for example, to assign folders don't use quotes and use \ instead of /) - ( Of course I had Interbase server running all the time.), and I wasn't lazy to reboot the system every time... Now count the combinations... Tiresome... Does anybody know how to solve this? Hi Zoran Is it possibly an issue with PHP.INI. From mine:- - ... ; ; Paths and Directories ; ; ... ; Directory in which the loadable extensions (modules) reside. ;extension_dir = ./ extension_dir = C:/program files/php/extensions ; Whether or not to enable the dl() function. The dl() function does NOT work ; properly in multithreaded servers, such as IIS or Zeus, and is automatically ; disabled on them. enable_dl = On ... ;; ; Dynamic Extensions ; ;; ; ... ;Windows Extensions ;Note that MySQL and ODBC support is now built in, so no dll is needed for it. ; ;extension=php_bz2.dll ... ;extension=php_interbase.dll ... -- Uncomment the last (shown) line and place the .dll in the extension_dir directory. Hope it helps, =dn -- 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] help me on projecting some tables
Hi, I've to store in a BD some alimentary product, and there are lot of informations like chemical, physical, nutritional characteristics , ... I don't know how to store this info. So I've a lot of product with a lot of corresponding characteristics. I've thought about to create a table where to store all chemical characteristics, a table for nutritional, ecc. and put in the product table the refer ID to all this caracteristic tables. But in this way, there's the problem that now I'm storing 3 chemical charact. but tomorrow I'd like to add a new charact., and I wouldn't change tha table structure adding a new column every time I've a new field that I haven't expected. Can someone show me the right strategy to resolve this kind of problem? Ciao, Carlo __ Abbonati a Yahoo! ADSL con Atlanet! Naviga su Internet ad alta velocità, e senza limiti di tempo! Per saperne di più vai alla pagina http://adsl.yahoo.it -- 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] PHP results bold in HTML
Hi everyone, I've noticed something strange, and I was wondering if you knew the answer: When I put the results of a query on a HTML page, the data that comes from the database (mysql) appears bold, while there is nothing to suggests it needs to that that in the HTML coding. I would like to change this so that the information isn't bolded. Any ideas or suggestions on this rather strange issue would be greatly appreciated! Yours, Kevin -- 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 results bold in HTML
Do you have a URL we can look at? Russ On Fri, 16 Nov 2001 12:44:14 +0100 Kevin Schaaps [EMAIL PROTECTED] wrote: Hi everyone, I've noticed something strange, and I was wondering if you knew the answer: When I put the results of a query on a HTML page, the data that comes from the database (mysql) appears bold, while there is nothing to suggests it needs to that that in the HTML coding. I would like to change this so that the information isn't bolded. Any ideas or suggestions on this rather strange issue would be greatly appreciated! Yours, Kevin -- 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] #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam 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] PHP results bold in HTML
Thanks Matt, Here it is: mysql_select_db ($dbname); // - -- // FLEET LIST // - -- $query = SELECT sim_tbl.name as SimName, class_tbl.class as SimClass, type_tbl.type as ClassType, sim_tbl.npc as SimNPC FROM sim_tbl, class_tbl, type_tbl WHERE sim_tbl.class = class_tbl.id AND class_tbl.type = type_tbl.id AND sim_tbl.fleet = $fleet_id ORDER BY 1; // - -- $result = mysql_query($query); $num_rows = mysql_num_rows($result); if ($num_rows != 0) { print table class=\db1\ tr td width=\60\/th td width=\135\bClass/b/th td width=\135\bName/b/th td width=\135\bType/b/th td width=\135\bNPC/b/th /tr; while ($row = mysql_fetch_array($result)) { $name = $row[SimName]; $class = $row[SimClass]; $type = $row[ClassType]; $NPC= $row[SimNPC]; if ($NPC == 1) { echo tr td/th td$class/th td$name/th td$type/th tdNON PLAYING SIM/th /tr\n; } else { echo tr td/th tdclass/h3/th td$name/h3/th td$type/h3/th tdACTIVE SIM/h3/th /tr\n; } }; } Matt Stewart [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... if you post a bit of the offending code then i'll have a look - sounds strange though -Original Message- From: Kevin Schaaps [mailto:[EMAIL PROTECTED]] Sent: 16 November 2001 11:44 To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP results bold in HTML Hi everyone, I've noticed something strange, and I was wondering if you knew the answer: When I put the results of a query on a HTML page, the data that comes from the database (mysql) appears bold, while there is nothing to suggests it needs to that that in the HTML coding. I would like to change this so that the information isn't bolded. Any ideas or suggestions on this rather strange issue would be greatly appreciated! Yours, Kevin -- 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01 -- 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] help me on projecting some tables
not really sure how to do this, other than planning for as much as you can in your original tables, then have a spare table with four columns - Row_ID, Characteristic_Name, Characteristic_Value, and Product_Refer_ID. so then if you get a new characteristic (eg colour) then you could have values 1, colour, blue, 4(the product with this characteristic). then the next line might be 2,colour,green,8 then 2,density,45kg/m3,8 etc. not sure this is the best way, but the only way i can think of to have various additional characteristics for some products. hope it helps?? Matt -Original Message- From: Carlo Loiudice [mailto:[EMAIL PROTECTED]] Sent: 16 November 2001 10:48 To: PHP DB Subject: [PHP-DB] help me on projecting some tables Hi, I've to store in a BD some alimentary product, and there are lot of informations like chemical, physical, nutritional characteristics , ... I don't know how to store this info. So I've a lot of product with a lot of corresponding characteristics. I've thought about to create a table where to store all chemical characteristics, a table for nutritional, ecc. and put in the product table the refer ID to all this caracteristic tables. But in this way, there's the problem that now I'm storing 3 chemical charact. but tomorrow I'd like to add a new charact., and I wouldn't change tha table structure adding a new column every time I've a new field that I haven't expected. Can someone show me the right strategy to resolve this kind of problem? Ciao, Carlo __ Abbonati a Yahoo! ADSL con Atlanet! Naviga su Internet ad alta velocità, e senza limiti di tempo! Per saperne di più vai alla pagina http://adsl.yahoo.it -- 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01 -- 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 results bold in HTML
Well depending on what results you have displayed in bold, you're using the HTML th tag, which automatically bolds any text inbetween. You should be a bit more consistent with its use: * Your use: td width=\135\bClass/b/th * Proper use: td width=\135\bClass/b/td or: th width=\135\bClass/b/th Maybe that's it?? Russ On Fri, 16 Nov 2001 12:53:07 +0100 Kevin Schaaps [EMAIL PROTECTED] wrote: Thanks Matt, Here it is: mysql_select_db ($dbname); // - -- // FLEET LIST // - -- $query = SELECT sim_tbl.name as SimName, class_tbl.class as SimClass, type_tbl.type as ClassType, sim_tbl.npc as SimNPC FROM sim_tbl, class_tbl, type_tbl WHERE sim_tbl.class = class_tbl.id AND class_tbl.type = type_tbl.id AND sim_tbl.fleet = $fleet_id ORDER BY 1; // - -- $result = mysql_query($query); $num_rows = mysql_num_rows($result); if ($num_rows != 0) { print table class=\db1\ tr td width=\60\/th td width=\135\bClass/b/th td width=\135\bName/b/th td width=\135\bType/b/th td width=\135\bNPC/b/th /tr; while ($row = mysql_fetch_array($result)) { $name = $row[SimName]; $class = $row[SimClass]; $type = $row[ClassType]; $NPC= $row[SimNPC]; if ($NPC == 1) { echo tr td/th td$class/th td$name/th td$type/th tdNON PLAYING SIM/th /tr\n; } else { echo tr td/th tdclass/h3/th td$name/h3/th td$type/h3/th tdACTIVE SIM/h3/th /tr\n; } }; } Matt Stewart [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... if you post a bit of the offending code then i'll have a look - sounds strange though -Original Message- From: Kevin Schaaps [mailto:[EMAIL PROTECTED]] Sent: 16 November 2001 11:44 To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP results bold in HTML Hi everyone, I've noticed something strange, and I was wondering if you knew the answer: When I put the results of a query on a HTML page, the data that comes from the database (mysql) appears bold, while there is nothing to suggests it needs to that that in the HTML coding. I would like to change this so that the information isn't bolded. Any ideas or suggestions on this rather strange issue would be greatly appreciated! Yours, Kevin -- 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01 -- 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] #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam 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] PHP results bold in HTML
I would start by checking the html tags - you've got a class call for the table - check the stylesheet at the top of the document to see if it's saying in class table.db1 the text is all bold. also, you seem to have some stray tags - surely the td start tag should end eith a /td rather than a /th? and at the bottom of the code there are some /h3 tags - there don't seem to be any h3 start tags, so you can probably get rid of those too. see if that helps at all, then post again if there are still problems with the new code. -Original Message- From: Kevin Schaaps [mailto:[EMAIL PROTECTED]] Sent: 16 November 2001 11:53 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] PHP results bold in HTML Thanks Matt, Here it is: mysql_select_db ($dbname); // - -- // FLEET LIST // - -- $query = SELECT sim_tbl.name as SimName, class_tbl.class as SimClass, type_tbl.type as ClassType, sim_tbl.npc as SimNPC FROM sim_tbl, class_tbl, type_tbl WHERE sim_tbl.class = class_tbl.id AND class_tbl.type = type_tbl.id AND sim_tbl.fleet = $fleet_id ORDER BY 1; // - -- $result = mysql_query($query); $num_rows = mysql_num_rows($result); if ($num_rows != 0) { print table class=\db1\ tr td width=\60\/th td width=\135\bClass/b/th td width=\135\bName/b/th td width=\135\bType/b/th td width=\135\bNPC/b/th /tr; while ($row = mysql_fetch_array($result)) { $name = $row[SimName]; $class = $row[SimClass]; $type = $row[ClassType]; $NPC= $row[SimNPC]; if ($NPC == 1) { echo tr td/th td$class/th td$name/th td$type/th tdNON PLAYING SIM/th /tr\n; } else { echo tr td/th tdclass/h3/th td$name/h3/th td$type/h3/th tdACTIVE SIM/h3/th /tr\n; } }; } Matt Stewart [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... if you post a bit of the offending code then i'll have a look - sounds strange though -Original Message- From: Kevin Schaaps [mailto:[EMAIL PROTECTED]] Sent: 16 November 2001 11:44 To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP results bold in HTML Hi everyone, I've noticed something strange, and I was wondering if you knew the answer: When I put the results of a query on a HTML page, the data that comes from the database (mysql) appears bold, while there is nothing to suggests it needs to that that in the HTML coding. I would like to change this so that the information isn't bolded. Any ideas or suggestions on this rather strange issue would be greatly appreciated! Yours, Kevin -- 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01 -- 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01 -- 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 results bold in HTML
$result = mysql_query($query); $num_rows = mysql_num_rows($result); if ($num_rows != 0) { print table class=\db1\ tr td width=\60\/th td width=\135\bClass/b/th td width=\135\bName/b/th td width=\135\bType/b/th td width=\135\bNPC/b/th /tr; while ($row = mysql_fetch_array($result)) { $name = $row[SimName]; $class = $row[SimClass]; $type = $row[ClassType]; $NPC= $row[SimNPC]; if ($NPC == 1) { echo tr td/th td$class/th td$name/th td$type/th tdNON PLAYING SIM/th /tr\n; } else { echo tr td/th tdclass/h3/th td$name/h3/th td$type/h3/th tdACTIVE SIM/h3/th /tr\n; } }; } First things first go through your html and clean up man. This is seriously bad... Don't close td with /th, mkae sure you tags are closed ie /th no opening tags for /h3 Then try again M: -- 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] help me on projecting some tables
Carlo, Your question is the reason for the invention of the relational database. Please do NOT add columns for planned expansion. How many extra columns would you need? 4? 10? 25? 100? Such a schema is wasteful of storage. There are several ways to go about this. For example: CREATE TABLE products( product_id int auto_increment primary key, description char(50) default , quantity int not null, unit enum (each,lb,ounce,gallon,quart), price decimal(5,2) not null ) CREATE TABLE traits( characteristic char(25) default , product_id int, description char(25) ) In the above example, when you wanted to add a characteristic for a particular product, you simply add a record into traits and set traits.product_id equal to products.product_id. This will make it REAL EASY doing joins on this combo as well. For example: INSERT INTO products VALUES(NULL, Coca Cola,1,ounce,0.39); INSERT INTO traits VALUES(Liquid,LAST_INSERT_ID(),Seltzer-based); INSERT INTO traits VALUES(Added Chemicals,LAST_INSERT_ID(),Sugar); INSERT INTO traits VALUES(Added Chemicals,LAST_INSERT_ID(),Brown Dye); INSERT INTO traits VALUES(Added Chemicals,LAST_INSERT_ID(),Caramel coloring); To get all the characteristics for a given product: SELECT * FROM products LEFT JOIN traits USING(product_id) ORDER BY char_1.characteristic In another example, if multiple products will come in multiple styles, you would create a table called STYLES and insert a record for each style available: CREATE TABLE styles( color char(10) default , product_id int, ) INSERT INTO products VALUES(NULL,Bread,1,each,1.49); INSERT INTO styles VALUES( White,LAST_INSERT_ID() ); INSERT INTO styles VALUES( Black,LAST_INSERT_ID() ); INSERT INTO styles VALUES( Wheat,LAST_INSERT_ID() ); INSERT INTO styles VALUES( Hawaiian,LAST_INSERT_ID() ); -Original Message- From: matt stewart [mailto:[EMAIL PROTECTED]] Sent: Friday, November 16, 2001 5:55 AM To: 'Carlo Loiudice'; PHP DB Subject: RE: [PHP-DB] help me on projecting some tables not really sure how to do this, other than planning for as much as you can in your original tables, then have a spare table with four columns - Row_ID, Characteristic_Name, Characteristic_Value, and Product_Refer_ID. so then if you get a new characteristic (eg colour) then you could have values 1, colour, blue, 4(the product with this characteristic). then the next line might be 2,colour,green,8 then 2,density,45kg/m3,8 etc. not sure this is the best way, but the only way i can think of to have various additional characteristics for some products. hope it helps?? Matt -Original Message- From: Carlo Loiudice [mailto:[EMAIL PROTECTED]] Sent: 16 November 2001 10:48 To: PHP DB Subject: [PHP-DB] help me on projecting some tables Hi, I've to store in a BD some alimentary product, and there are lot of informations like chemical, physical, nutritional characteristics , ... I don't know how to store this info. So I've a lot of product with a lot of corresponding characteristics. I've thought about to create a table where to store all chemical characteristics, a table for nutritional, ecc. and put in the product table the refer ID to all this caracteristic tables. But in this way, there's the problem that now I'm storing 3 chemical charact. but tomorrow I'd like to add a new charact., and I wouldn't change tha table structure adding a new column every time I've a new field that I haven't expected. Can someone show me the right strategy to resolve this kind of problem? Ciao, Carlo __ Abbonati a Yahoo! ADSL con Atlanet! Naviga su Internet ad alta velocità, e senza limiti di tempo! Per saperne di più vai alla pagina http://adsl.yahoo.it -- 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01 -- 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] Why use MySQL with PHP
Hmm it's not PHP functionality that makes html ugly as shown at validator.w3.org. It's the person's html/php coding ability to avoid coding mistakes. Basically, PHP gives functionality. A part of that functionality is for the php programmer to make correct HTML as output so the browser will render a page as output correctly. If the php programmer is a real bonehead and he/she can't instruct php to return good HTML that doesn't make a HTML validator from coughing up errors, it's not PHP's fault, it's the coders. I've been programming PHP for quite a while now and I can't think of a single regular thing in PHP that'd cause any browser (Netscape or IE) to hang. Any time that I've had problems, it's because I didn't know the limits of what I was coding to try and do something that is outside the possibilities. Whether it's storing information in a database, retrieving information from a database, sending PHP headers to redirect to another page or sending PHP headers to set a cookie, etc. You have to know when you can do things in PHP and when you can't. If web pages hang in a browser, it's the buggy PHP code that is interpreted that's causing the problems. Not PHP itself. It's like putting gasoline w/ water in a gas tank. It's not the engine's fault it's spitting and sputtering. It's the fuel supply. Tyler Nally [EMAIL PROTECTED] American Legion Website -Original Message- From: Sheridan Saint-Michel [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 15, 2001 6:02 PM To: B. van Ouwerkerk; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Why use MySQL with PHP Tell me about it. You ever try running php.net through http://validator.w3.org ? It's not pretty. Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com - Original Message - From: B. van Ouwerkerk [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, November 15, 2001 12:28 PM Subject: Re: [PHP-DB] Why use MySQL with PHP I just remembered, the only bad thing I can think of about MySQL... their website locks up Netscape =) PHP qualifies for this too. www.php.net looks pretty messy in NS. By the way, both doesn't break NS.. 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] -- 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] Why use MySQL with PHP
Oh PHP itself isn't to blame at all, and I never intended to infer that. If you point the W3C validator at www.foxjet.com you will get a clean rating and that page is generated via PHP. Someone mentioned that they got errors in Netscape and I was just pointing out that for some reason the people who built www.php.net didn't make the page W3C compliant. Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com - Original Message - From: Nally, Tyler G. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 16, 2001 8:36 AM Subject: RE: [PHP-DB] Why use MySQL with PHP Hmm it's not PHP functionality that makes html ugly as shown at validator.w3.org. It's the person's html/php coding ability to avoid coding mistakes. Basically, PHP gives functionality. A part of that functionality is for the php programmer to make correct HTML as output so the browser will render a page as output correctly. If the php programmer is a real bonehead and he/she can't instruct php to return good HTML that doesn't make a HTML validator from coughing up errors, it's not PHP's fault, it's the coders. I've been programming PHP for quite a while now and I can't think of a single regular thing in PHP that'd cause any browser (Netscape or IE) to hang. Any time that I've had problems, it's because I didn't know the limits of what I was coding to try and do something that is outside the possibilities. Whether it's storing information in a database, retrieving information from a database, sending PHP headers to redirect to another page or sending PHP headers to set a cookie, etc. You have to know when you can do things in PHP and when you can't. If web pages hang in a browser, it's the buggy PHP code that is interpreted that's causing the problems. Not PHP itself. It's like putting gasoline w/ water in a gas tank. It's not the engine's fault it's spitting and sputtering. It's the fuel supply. Tyler Nally [EMAIL PROTECTED] American Legion Website -Original Message- From: Sheridan Saint-Michel [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 15, 2001 6:02 PM To: B. van Ouwerkerk; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Why use MySQL with PHP Tell me about it. You ever try running php.net through http://validator.w3.org ? It's not pretty. Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com - Original Message - From: B. van Ouwerkerk [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, November 15, 2001 12:28 PM Subject: Re: [PHP-DB] Why use MySQL with PHP I just remembered, the only bad thing I can think of about MySQL... their website locks up Netscape =) PHP qualifies for this too. www.php.net looks pretty messy in NS. By the way, both doesn't break NS.. 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] -- 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]
[PHP-DB] Upload
Hi, Exists some component that allows to do upload from archives to the Web server? Where it could find it? Somebody knows? The ideal would be that it served so much for Apache as for IIS. The Database is Oracle 8i Thank you very much. -- Saludos, Lilian mailto:[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] Query help
Not really this list but I'm after a quick bit of help. If I run this query select count(room) from freerooms; -83 and this SELECT WEEK(MAX(date),1), WEEK(MIN(date),1)as totalweeks FROM booking; -4840 All good so far now if I run this SELECT count(f.room),WEEK(MAX(b.date),1), WEEK(MIN(b.date),1) FROM freero oms f, booking b; -+---+-+-+ | count(f.room) | WEEK(MAX(b.date),1) | WEEK(MIN(b.date),1) | +---+-+-+ | 24817 | 48 | 40 | +---+-+-+ It seems to be mulitplying out for some reason but I'm stuck as to how/why and how to resolve it. TIA M: -- 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] Query help
SELECT count(f.room),WEEK(MAX(b.date),1), WEEK(MIN(b.date),1) FROM freero oms f, booking b; will be SELECT count(f.room),WEEK(MAX(b.date),1), WEEK(MIN(b.date),1) FROM freero oms f LEFT JOIN booking USING(room) b; room is the field which connects two tables. If it has different name change it in USING Other problems? Write.. Regards, Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: Matt Williams [EMAIL PROTECTED] To: Php-Db@Lists. Php. [EMAIL PROTECTED] Sent: Friday, November 16, 2001 5:20 PM Subject: [PHP-DB] Query help Not really this list but I'm after a quick bit of help. If I run this query select count(room) from freerooms; -83 and this SELECT WEEK(MAX(date),1), WEEK(MIN(date),1)as totalweeks FROM booking; -48 40 All good so far now if I run this SELECT count(f.room),WEEK(MAX(b.date),1), WEEK(MIN(b.date),1) FROM freero oms f, booking b; -+---+-+-+ | count(f.room) | WEEK(MAX(b.date),1) | WEEK(MIN(b.date),1) | +---+-+-+ | 24817 | 48 | 40 | +---+-+-+ It seems to be mulitplying out for some reason but I'm stuck as to how/why and how to resolve it. TIA M: -- 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] Query help
Ooops SELECT count(f.room),WEEK(MAX(b.date),1), WEEK(MIN(b.date),1) FROM freerooms as f LEFT JOIN booking AS b USING(room); Apolgizes - Original Message - From: Andrey Hristov [EMAIL PROTECTED] To: Matt Williams [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, November 16, 2001 5:32 PM Subject: Re: [PHP-DB] Query help SELECT count(f.room),WEEK(MAX(b.date),1), WEEK(MIN(b.date),1) FROM freero oms f, booking b; will be SELECT count(f.room),WEEK(MAX(b.date),1), WEEK(MIN(b.date),1) FROM freero oms f LEFT JOIN booking USING(room) b; room is the field which connects two tables. If it has different name change it in USING Other problems? Write.. Regards, Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: Matt Williams [EMAIL PROTECTED] To: Php-Db@Lists. Php. [EMAIL PROTECTED] Sent: Friday, November 16, 2001 5:20 PM Subject: [PHP-DB] Query help Not really this list but I'm after a quick bit of help. If I run this query select count(room) from freerooms; -83 and this SELECT WEEK(MAX(date),1), WEEK(MIN(date),1)as totalweeks FROM booking; -48 40 All good so far now if I run this SELECT count(f.room),WEEK(MAX(b.date),1), WEEK(MIN(b.date),1) FROM freero oms f, booking b; -+---+-+-+ | count(f.room) | WEEK(MAX(b.date),1) | WEEK(MIN(b.date),1) | +---+-+-+ | 24817 | 48 | 40 | +---+-+-+ It seems to be mulitplying out for some reason but I'm stuck as to how/why and how to resolve it. TIA M: -- 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]
RE: [PHP-DB] help me on projecting some tables
A couple of questions: INSERT INTO traits VALUES(Added Chemicals,LAST_INSERT_ID(),Sugar); 1. Will LAST_INSERT_ID() work reliably in a multi-user environment? What happens if you're in the middle of inserting a dozen records and someone else inserts a record? Does MySQL keep the LAST_INSERT_ID()s separate (since the web application will see both transactions as being done by the same user)? 2. Is there any benefit to having a 3rd table to keep track of characteristics ? I guess that quesiton is best answered by examining the business needs. If the characteristics are few and don't change often, it seems to me that you'd want a 3rd table to keep them. That way, the spelling is similar, etc, and therefore you can do (accurate) queries based on the characteristics (if the need ever came up) TIM -Whenever you hear a man speak of his love for his country, it is a sure sign he expects to be paid for it. -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] CREATE TABLE products( product_id int auto_increment primary key, description char(50) default , quantity int not null, unit enum (each,lb,ounce,gallon,quart), price decimal(5,2) not null ) CREATE TABLE traits( characteristic char(25) default , product_id int, description char(25) ) In the above example, when you wanted to add a characteristic for a particular product, you simply add a record into traits and set traits.product_id equal to products.product_id. This will make it REAL EASY doing joins on this combo as well. For example: INSERT INTO products VALUES(NULL, Coca Cola,1,ounce,0.39); INSERT INTO traits VALUES(Liquid,LAST_INSERT_ID(),Seltzer-based); INSERT INTO traits VALUES(Added Chemicals,LAST_INSERT_ID(),Sugar); INSERT INTO traits VALUES(Added Chemicals,LAST_INSERT_ID(),Brown Dye); INSERT INTO traits VALUES(Added Chemicals,LAST_INSERT_ID(),Caramel coloring); -- 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] Converting Date Form Fields
I have two HTML form fields birthMonth (e.g., Jan=1, Feb=2...) and birthYear (e.g., 2001=2001, 1999=1999...). How can take these two individual form fields, then add in a default value of 1 for the birthDay (this is not asked in the form), and put this data into a MySQL table field birthDate with field type DATE (-MM-DD)? The part I do not know how to accomplish is taking these form fields and then combining them into a date field/format. Thank you. Zach Curtis POPULUS -- 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] Converting Date Form Fields
put them into an array $date_stuff[0] = $date_year; $date_stuff[1] = $date_month; $date_stuff[2] = 01; $date_to_enter = join('-',$date_stuff); then whack $date_to_enter into your database - obviously if the input to $date_month is Jan, you need a case statement, or something like that to make sure you change it to 01. Hope it helps ;) Matt -Original Message- From: Zach Curtis [mailto:[EMAIL PROTECTED]] Sent: 16 November 2001 16:02 To: [EMAIL PROTECTED] Subject: [PHP-DB] Converting Date Form Fields I have two HTML form fields birthMonth (e.g., Jan=1, Feb=2...) and birthYear (e.g., 2001=2001, 1999=1999...). How can take these two individual form fields, then add in a default value of 1 for the birthDay (this is not asked in the form), and put this data into a MySQL table field birthDate with field type DATE (-MM-DD)? The part I do not know how to accomplish is taking these form fields and then combining them into a date field/format. Thank you. Zach Curtis POPULUS -- 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01 -- 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] odbc_statistics()
How does on use the odbc_statistics() function? I think I've figured out what all of the arguments are except unique accuracy Does anybody know their function. Every time I use this fuction I get: Warning: SQL error: , SQL state 0 in SQLStatistics in F:\pdflinker\test.php on line 8 None of the references seem to point out what these two arguments are for. -- 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] help me on projecting some tables
1. Don't know answer to question. However, surround the INSERTs with LOCK/UNLOCK Table commands to prevent the problem you desecribe. Or, the script (PHP,PERL,C,Python...) can insert product record, retrieve the product_id, then use that for the product_id into the traits table. -Original Message- From: Tim Foster [mailto:[EMAIL PROTECTED]] Sent: Friday, November 16, 2001 9:42 AM To: PHP DB Subject: RE: [PHP-DB] help me on projecting some tables A couple of questions: INSERT INTO traits VALUES(Added Chemicals,LAST_INSERT_ID(),Sugar); 1. Will LAST_INSERT_ID() work reliably in a multi-user environment? What happens if you're in the middle of inserting a dozen records and someone else inserts a record? Does MySQL keep the LAST_INSERT_ID()s separate (since the web application will see both transactions as being done by the same user)? 2. Is there any benefit to having a 3rd table to keep track of characteristics ? I guess that quesiton is best answered by examining the business needs. If the characteristics are few and don't change often, it seems to me that you'd want a 3rd table to keep them. That way, the spelling is similar, etc, and therefore you can do (accurate) queries based on the characteristics (if the need ever came up) TIM -Whenever you hear a man speak of his love for his country, it is a sure sign he expects to be paid for it. -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] CREATE TABLE products( product_id int auto_increment primary key, description char(50) default , quantity int not null, unit enum (each,lb,ounce,gallon,quart), price decimal(5,2) not null ) CREATE TABLE traits( characteristic char(25) default , product_id int, description char(25) ) In the above example, when you wanted to add a characteristic for a particular product, you simply add a record into traits and set traits.product_id equal to products.product_id. This will make it REAL EASY doing joins on this combo as well. For example: INSERT INTO products VALUES(NULL, Coca Cola,1,ounce,0.39); INSERT INTO traits VALUES(Liquid,LAST_INSERT_ID(),Seltzer-based); INSERT INTO traits VALUES(Added Chemicals,LAST_INSERT_ID(),Sugar); INSERT INTO traits VALUES(Added Chemicals,LAST_INSERT_ID(),Brown Dye); INSERT INTO traits VALUES(Added Chemicals,LAST_INSERT_ID(),Caramel coloring); -- 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] Upload
Hola Lilian, You might want to check http://phpclasses.upperdesign.com and search for upload. - BUT - I have found it much easier and simpler to just to use my own code when doing uploads. It is really simple, since most of the work is done by the browser and the server programs. To add an upload function just create 2 pages: --- page1.html (Can be located anywhere, even on your desktop) FORM ENCTYPE=multipart/form-data ACTION=http://www.mysite.com/page2.php; METHOD=POST INPUT TYPE=File NAME=NewUpload INPUT TYPE=Submit /FORM --- --- page2.php (Should be at http://www.mysite.com/page2.php) ? copy($NewUpload, /directory/to/put/uploaded/file/into/ . $NewUpload_name); ? --- - Jonathan -Original Message- From: Lilian Salazar [mailto:[EMAIL PROTECTED]] Sent: Friday, November 16, 2001 8:09 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Upload Hi, Exists some component that allows to do upload from archives to the Web server? Where it could find it? Somebody knows? The ideal would be that it served so much for Apache as for IIS. The Database is Oracle 8i Thank you very much. -- Saludos, Lilian mailto:[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]
RE: [PHP-DB] Upload
always make sure you restrict what can be uploaded though! only allow file extensions that you know are safe! otherwise people might do nasty things to your server! -Original Message- From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]] Sent: 16 November 2001 16:29 To: 'Lilian Salazar'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Upload Hola Lilian, You might want to check http://phpclasses.upperdesign.com and search for upload. - BUT - I have found it much easier and simpler to just to use my own code when doing uploads. It is really simple, since most of the work is done by the browser and the server programs. To add an upload function just create 2 pages: --- page1.html (Can be located anywhere, even on your desktop) FORM ENCTYPE=multipart/form-data ACTION=http://www.mysite.com/page2.php; METHOD=POST INPUT TYPE=File NAME=NewUpload INPUT TYPE=Submit /FORM --- --- page2.php (Should be at http://www.mysite.com/page2.php) ? copy($NewUpload, /directory/to/put/uploaded/file/into/ . $NewUpload_name); ? --- - Jonathan -Original Message- From: Lilian Salazar [mailto:[EMAIL PROTECTED]] Sent: Friday, November 16, 2001 8:09 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Upload Hi, Exists some component that allows to do upload from archives to the Web server? Where it could find it? Somebody knows? The ideal would be that it served so much for Apache as for IIS. The Database is Oracle 8i Thank you very much. -- Saludos, Lilian mailto:[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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01 -- 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] Converting Date Form Fields
Ah, the join function...I see implode() will also perform the same task. That was what I needed to do. Thanks! Zach -Original Message- From: matt stewart [mailto:[EMAIL PROTECTED]] Sent: Friday, November 16, 2001 9:06 AM To: 'Zach Curtis'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Converting Date Form Fields put them into an array $date_stuff[0] = $date_year; $date_stuff[1] = $date_month; $date_stuff[2] = 01; $date_to_enter = join('-',$date_stuff); then whack $date_to_enter into your database - obviously if the input to $date_month is Jan, you need a case statement, or something like that to make sure you change it to 01. Hope it helps ;) Matt -Original Message- From: Zach Curtis [mailto:[EMAIL PROTECTED]] Sent: 16 November 2001 16:02 To: [EMAIL PROTECTED] Subject: [PHP-DB] Converting Date Form Fields I have two HTML form fields birthMonth (e.g., Jan=1, Feb=2...) and birthYear (e.g., 2001=2001, 1999=1999...). How can take these two individual form fields, then add in a default value of 1 for the birthDay (this is not asked in the form), and put this data into a MySQL table field birthDate with field type DATE (-MM-DD)? The part I do not know how to accomplish is taking these form fields and then combining them into a date field/format. Thank you. Zach Curtis POPULUS -- 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01 -- 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] Re: PHP, ODBC Access2k - Getting a field value from the last INSERT
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... I have a table that I need to update using INSERT INTO table (field1, field2) VALUES (val1, val2) The table has an AutoNumber field for a Primary Key called ID. I need to get the ID that was assigned in the INSERT. With PostgreSQL you do this with oids but as far as I know Access doesn't use them. How then can I do this? Well, since you insist on using Access for a web database... Here's one way... Make sure you are tracking sessions, Create a session field in the Access table. After the instr, select the max(recordID) for the table with the current session number. Many here would recommend that you convert to mySQL and drop Access... -- 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] PHP, HTML and Oracle
Ok, now I'm having another problem. I didn't know if the second insert statement had to have a different name, so I gave it the name insert2 and went through the parse etc. But when I ran it it said there was an error - an invlaid number. So then I changed it so the second insert statement was also called $insert and commeneted out all the unnecessary fault. Now, I am again getting the error:- Warning: OCIStmtExecute: ORA-01722: invalid number in /mntdw/pgrad2/base/g/geb97/public_html/enterProject1.php4 on line 53 Array Line 53 is the line that says: $result = OCIExecute($ins_statement); Code is below ! enterProject1.php4 ?php if ($submit == Click here to enter project) file://if a connection to the database is not made output a message if (!$connection) { echo I couldn't make a connection!; exit; } file://insert relevant values into the project table $insert = insert into PROJECT values ('$projectID', '$moduleID', '$title', '$originator', '$softwareHardware', '$specialSkills', '$status', '$externalAgreement', '$background', '$tasks', '$steps', '$references'); file://insert relevant values into projkey table $insert = insert into PROJKEY values ('$projectID', '$keyword'); file://formulate the query $query = select projectID, moduleID, title, originator, softwareHardware, specialSkills, status, externalAgreement, background, tasks, steps, references from PROJECT WHERE projectID='$projectID'; file://parse the three statements $ins_statement = OCIParse ($connection, $insert); file://$ins_statement2 = OCIParse ($connection, $insert2); $qry_statement = OCIParse ($connection, $query); file://execute the first insert statement and print error message if there is an error $result = OCIExecute($ins_statement); if (!$result) { echo OCIError($ins_statement).p; exit; } file://execute the first insert statement and print error message if there is an error file://$result2= OCIExecute($ins_statement2); file://if (!$result2) file://{ // echo OCIError($ins_statement2).p; // exit; file://} file://execute the query statement OCIExecute($qry_statement); etc. etc. etc. At 08:19 09/11/2001 +0100, you wrote: oh, keyword is an other table ? if it is, you have to use TWO insert : $insert = insert into project values (...); ... do all stuff $insert = insert into keyword values (...); ... do all stuff if keyword is a field of the project table - as I thought cause I'd read very quickly your pages -, you have to complete your first insert : insert into project values ('$projectID', '$moduleID', '$title', '$originator', '$softwareHardware', '$specialSkills', '$keyword', '$status', '$externalAgreement', '$background', '$tasks', '$steps', '$references') (keyword at the good place ! in the order of the table) Best regards, Philippe - Message d'origine - De : GEORGINA ELAINE BAILEY [EMAIL PROTECTED] À : Philippe Saladin [EMAIL PROTECTED] Envoyé : jeudi 8 novembre 2001 18:12 Objet : Re: PHP, Oracle and HTML That was such an abvious mistake really - forgive me for being stupid. But to put it all in one $insert how would I do it. Would it be:- file://insert values into the table $insert = insert into PROJECT, KEYWORD values ('$projectID', '$moduleID', '$title', '$originator', '$softwareHardware', '$specialSkills', '$status', '$externalAgreement', '$background', '$tasks', '$steps', '$references') AND ('$keyword); OR:- file://insert values into the table $insert = insert into PROJECT values ('$projectID', '$moduleID', '$title', '$originator', '$softwareHardware', '$specialSkills', '$status', '$externalAgreement', '$background', '$tasks', '$steps', '$references') AND insert into KEYWORD values ('$keyword'); Cheers Georgina At 08:53 08/11/2001 +0100, you wrote: Georgina, keyword doesn't appear in your Insert sql statement in enterproject1.php4 ?? BTW, I think it's very *dangerous* to join your files : now, we know your url, and most important, the oracle home, the database password, the oracle user ... someone with bad intentions could use all these informations Regards, Philippe - Message d'origine - De : Georgina Elaine Bailey [EMAIL PROTECTED] Groupes de discussion : php.db À : [EMAIL PROTECTED] Envoyé : mercredi 7 novembre 2001 21:08 Objet : PHP, Oracle and HTML Can anyone help me? I don't expect you to run my code or anything, just take a look at the scripts. Somewhere between entering projects and searching for them something goes wrong. Regardless of which keyword radio button I click when entering the project, it always stores it as java when I search for it. However, it does store the right moduleID ?? --- -
Re[2]: [PHP-DB] Upload
well, thank you very much to all by the aid and the advice!! I am going to see that it happens -- Saludos, Lilianmailto:[EMAIL PROTECTED] matt always make sure you restrict what can be uploaded though! only allow file matt extensions that you know are safe! otherwise people might do nasty things to matt your server! matt -Original Message- matt From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]] matt Sent: 16 November 2001 16:29 matt To: 'Lilian Salazar'; [EMAIL PROTECTED] matt Subject: RE: [PHP-DB] Upload matt Hola Lilian, matt You might want to check http://phpclasses.upperdesign.com and search for matt upload. matt - BUT - matt I have found it much easier and simpler to just to use my own code when matt doing uploads. It is really simple, since most of the work is done by the matt browser and the server programs. To add an upload function just create 2 matt pages: matt --- matt page1.html (Can be located anywhere, even on your desktop) matt FORM ENCTYPE=multipart/form-data ACTION=http://www.mysite.com/page2.php; METHOD=POST matt INPUT TYPE=File NAME=NewUpload matt INPUT TYPE=Submit matt /FORM matt --- matt --- matt page2.php (Should be at http://www.mysite.com/page2.php) matt ? matt copy($NewUpload, /directory/to/put/uploaded/file/into/ . $NewUpload_name); ? matt --- matt - Jonathan matt -Original Message- matt From: Lilian Salazar [mailto:[EMAIL PROTECTED]] matt Sent: Friday, November 16, 2001 8:09 AM matt To: [EMAIL PROTECTED] matt Subject: [PHP-DB] Upload matt Hi, matt Exists some component that allows to do upload from archives to the matt Web server? Where it could find it? Somebody knows? matt The ideal would be that it served so much for Apache as for IIS. The matt Database is Oracle 8i matt Thank you very much. -- 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] Re: Converting Date Form Fields
Hi Zach This is how I did it: $DateToInsert = $year .-. $month .-. $day ; Mike.. Zach Curtis [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have two HTML form fields birthMonth (e.g., Jan=1, Feb=2...) and birthYear (e.g., 2001=2001, 1999=1999...). How can take these two individual form fields, then add in a default value of 1 for the birthDay (this is not asked in the form), and put this data into a MySQL table field birthDate with field type DATE (-MM-DD)? The part I do not know how to accomplish is taking these form fields and then combining them into a date field/format. Thank you. Zach Curtis POPULUS -- 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] PostgreSQL connection problem
Hi, I try to connect to a PostgreSQL database from my php script, and I get the following error: Warning: Unable to connect to PostgreSQL server: FATAL 1: Database www-data does not exist in the system catalog. in /home/lao/proj/hajnalcsillag/www/classes/DBConnection.php on line 10 The code is: ? class DBConnection { var $con_string; function DBConnection() { $con_string = dbname=hajnalcsillag user=lao password=abc123 host=localhost port=5432; $ret = pg_connect( $this-con_string ); } } ? The versions are: PHP Version 4.1.0RC1 PostgreSQL 7.1.3 Could anyone help me please? Thanks, Peter -- 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] www.Aerotaxi.net
www.Aerotaxi.net -- 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]