[PHP-DB] Re: characters problem
It doesn't work :( I also read on the php.net for addslashes and stripslashes but still nothin :( Any other ideas guyz? Thx Panos Nadim Attari [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] $myquery=INSERT INTO `$table` (`comments`) VALUES ('$mycomments'); $mycomments = addslashes($mycomments); $myquery = INSERT INTO $table (comments) VALUES ('$mycomments'); See: http://www.php.net/addslashes Hope it solves the problem. nadim attari -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] characters problem
Two years and you haven't heard of: addslashes? mysql_reaL_escape_string? or even something as simple as $comments = str_replace(','',$comments); to replace the one quote with two single quotes (don't forget to remove them on the display...) bastien From: Panos Yahoo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] characters problem Date: Fri, 17 Dec 2004 09:38:15 +0200 Dear All, I am using php and mysql the last two years, and I still cannot find the way to update a field on mysql from php that containts the single quotes ( ` and ' ) Examples Here is an example of my index.php file. I have to type something on Comments field - ? include(../configs/dates.inc); include(../configs/config.inc); echo br body bgcolor=#FFF8E1 text=#2003CF link=#2003CF vlink=#2003CF alink=#2003CF center form method=post action=add.php font face=\Comic Sans MS\Commentsbrtextarea rows=3 cols=40 name=mycomments tabind ex=22/textarea input type=submit name=Submit value=\Add Ticket\ input type=reset name=Reset value=\Clear Form\ ; mysql_close($myconn); ? - In the html text area, I am typing the following text : Hello My name is Panos and I'm from Greece The add.php file looks like this : - ? include(../configs/dates.inc); include(../configs/config.inc); $myquery=INSERT INTO `$table` (`comments`) VALUES ('$mycomments'); $myresult=mysql_db_query($db,$myquery); mysql_close($myconn); echo done; ? - ANd when i'm trying to see what was added on mysql, i have the following result : Hello My name is Panos and I\ - The field on mysql is TEXT Does anyone knows how can i resolve this problem? Thanks Panos -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Re: characters problem
try echoing out the sql to see what it looks like, you may also have magic_quotes turned on...turn it off bastien From: Panos Yahoo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: characters problem Date: Fri, 17 Dec 2004 11:20:01 +0200 It doesn't work :( I also read on the php.net for addslashes and stripslashes but still nothin :( Any other ideas guyz? Thx Panos Nadim Attari [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] $myquery=INSERT INTO `$table` (`comments`) VALUES ('$mycomments'); $mycomments = addslashes($mycomments); $myquery = INSERT INTO $table (comments) VALUES ('$mycomments'); See: http://www.php.net/addslashes Hope it solves the problem. nadim attari -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] mysql to access
Does anyone know of a FREE program that exports MySQL to access? The trial versions of the ones I have downloaded do not export all the records of the database. - Matthew
RE: [PHP-DB] mysql to access
-Original Message- From: Perry, Matthew (Fire Marshal's Office) [mailto:[EMAIL PROTECTED] Does anyone know of a FREE program that exports MySQL to access? The trial versions of the ones I have downloaded do not export all the records of the database. If you can get a .csv export of your database, you should be able to bring that into access no problem. phpMyAdmin is able to generate such a beast (access would probably prefer the 'excel csv export' - what with microsoft and all) - and I'm sure many other programs can easily generate csv exports. - Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Apache2+PHP5, Connecting to multiple Oracle servers
Hi, I use Apache2+PHP5 on Linux to connect to an Oci8 compliant remote Oracle server. I have compiled PHP against the Oracle client release 10.1.0. This works fine so far. I need to connect to an older remote Oracle server, too. This Oracle version is 8.0.5 which seems to be too old to work with the same configuration. I guess I have two options: - To install an older Oracle client release for Linux and configure PHP with Oci7 (is 8.0.5 oci7 compliant?) and Oci8. - To use odbc with the older Oracle. I thought it might be a good idea to use odbc so I configured PHP with iodbc driver manager support. Unfortunately, I can't find an Oracle odbc driver for Linux! There seem to be commercial drivers but are they worth buying? If I decided to install a native Oracle client for the older database, which client version should I choose? Thank you for your ideas on this matter! Mikael Jokela -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] mysql to access
why not just link the mysql to access? bastien From: Perry, Matthew (Fire Marshal's Office) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] mysql to access Date: Fri, 17 Dec 2004 09:33:39 -0600 Does anyone know of a FREE program that exports MySQL to access? The trial versions of the ones I have downloaded do not export all the records of the database. - Matthew -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] PHP, MySQL and phpMyAdmin versions...
I am running MySQL 3.23.49 under Windows NT (XP Home). I also run PHP 4.3.9 on the same server, and use phpMyAdmin 2.6.0-pl2 for admin to my databases. I cannot upgrade to MySQL 4.x becuase apparently the MySQL API included with my PHP distro is not up to date enough to work with the revised security system in MySQL 4. I can't find a newer or better binary distro of PHP4 with a more suitable API, nor do i have the time, facilities or knowledge to bake my own from the source. Any suggestions, as I really need some of the facilities in MySQL 4.1.x? P.S. for Matrin Nowland - thanks for the help on the 'ON DUPLICATE KEY UPDATE' thing, I didn't realise it was a new thing in MySQL 4.1.0! goes away to kick himself ;-) -- Mark Benson http://homepage.mac.com/markbenson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] html display
sorry but this has nothing to do with: 1. DBs 2. PHP 3. LAMP ok out right your mostly correct, but what I really want to do is display fixed content for dynamic searches for a web site on a lamp server,(fc2) their php is a little out dated, but their in the move to 5 so its ok, I would like it to be more classic of a site with navi on the left, a banner bar at the top, and content in the center, all the content must come out of a mysql DB, I want the base level code, (I.e. the template) to stay the same, just let the content to change, it would be great if I could set this up so I could host multiple sites off this one framework/template with DB prefixes for different sites most if not all will be an Ecomm solution, so in the end, Yes it does have something to do with DBs PHP Lamp thx
RE: [PHP-DB] mysql to access
Here is the problem: I am currently using MySQL and PHP for this application but have realized recently that the bulk of my work is setting up three forms (add, view, modify) for each table I create. It takes hours for each table with MySQL and PHP but takes only minutes with Access. Also, other office administrators have been trained in Access instead of MySQL and will not be able to update my tables directly or set up new forms if I only use MySQL and PHP. On the other hand, PHP and ASP are easier and more flexible with user control options. Also, directly entering SQL can be much more efficient than using Access's embedded SQL applications. I really would like to exploit the advantages of both databases but do not know the best means by which to do this. We are creating a standard that will be followed by everyone in our department and need the best and most efficient solution possible. People move around from different positions constantly and it seems we are making radical changes to our system every year. Here are three questions with which I still need help: 1) Would it really make sense to split the data management between two linked databases (Access and MySQL) or would this just cause problems? 2) If I must use Access, should I use ASP(grrr) instead of PHP? 3) If I must use Access, should I use MS SQL Server(grrr) instead of MySQL? Thank you all for your time and patience. - Matthew -Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Friday, December 17, 2004 10:01 AM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql to access it would depend on what you need the app to do...if you are looking to use access to do reporting and/ or act as a front end, then it may be feasible... more details, if you care to share them, may help in this consideration bastien From: Perry, Matthew (Fire Marshal's Office) [EMAIL PROTECTED] To: Bastien Koert [EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql to access Date: Fri, 17 Dec 2004 09:59:25 -0600 You mean link the tables? I haven't yet considered this. - Matthew -Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Friday, December 17, 2004 9:42 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql to access why not just link the mysql to access? bastien From: Perry, Matthew (Fire Marshal's Office) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] mysql to access Date: Fri, 17 Dec 2004 09:33:39 -0600 Does anyone know of a FREE program that exports MySQL to access? The trial versions of the ones I have downloaded do not export all the records of the database. - Matthew -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Apache2+PHP5, Connecting to multiple Oracle servers
I compiled my PHP Apache with the Oracle 8.1.7 client for Linux. Oracle 10g can only communicate with Oracle 10g Oracle 9i. The 8.1.7 client can communicate with Oracle 7, 8, 8i, 9i, 10g. I also have a configuration compiled against the 9.2.0.4 client but it can not communicate with Oracle 7. So I would suggest using the 8i or 9i client if you have the need to connect to and Oracle 8.x database as well as a 10.x database. Roy A. Jones US Pharma Database Administration GlaxoSmithKline Inc. US Pharma IT, Shared Services Email: [EMAIL PROTECTED] Mikael Jokela [EMAIL PROTECTED] 17-Dec-2004 10:35 To [EMAIL PROTECTED] cc Subject [PHP-DB] Apache2+PHP5, Connecting to multiple Oracle servers Hi, I use Apache2+PHP5 on Linux to connect to an Oci8 compliant remote Oracle server. I have compiled PHP against the Oracle client release 10.1.0. This works fine so far. I need to connect to an older remote Oracle server, too. This Oracle version is 8.0.5 which seems to be too old to work with the same configuration. I guess I have two options: - To install an older Oracle client release for Linux and configure PHP with Oci7 (is 8.0.5 oci7 compliant?) and Oci8. - To use odbc with the older Oracle. I thought it might be a good idea to use odbc so I configured PHP with iodbc driver manager support. Unfortunately, I can't find an Oracle odbc driver for Linux! There seem to be commercial drivers but are they worth buying? If I decided to install a native Oracle client for the older database, which client version should I choose? Thank you for your ideas on this matter! Mikael Jokela -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] PHP, MySQL and phpMyAdmin versions...
huh? you can and should be able to upgrade to 4.0.x without too many problems. PHP 4.3.9 has no problems with that, nor will PHPMyAdmin. Moving to mySQL 4.1 will involve more pain as the protocols are vastly different and uses a different php library (mysqli). For upgrade info see here (http://dev.mysql.com/doc/mysql/en/Upgrade.html) What you might want to do, is back up your v3 db. then install 4.0.x (they can co-exist on the same machine). Configure PHP and PHPMyAdmin to handle the new server as well, then migrate the data to the new server (in the case of MyISAM tables, just copy the folders from the v3 db to the data folder in the v4 db) hth bastien From: Mark Benson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP, MySQL and phpMyAdmin versions... Date: Fri, 17 Dec 2004 15:58:08 + I am running MySQL 3.23.49 under Windows NT (XP Home). I also run PHP 4.3.9 on the same server, and use phpMyAdmin 2.6.0-pl2 for admin to my databases. I cannot upgrade to MySQL 4.x becuase apparently the MySQL API included with my PHP distro is not up to date enough to work with the revised security system in MySQL 4. I can't find a newer or better binary distro of PHP4 with a more suitable API, nor do i have the time, facilities or knowledge to bake my own from the source. Any suggestions, as I really need some of the facilities in MySQL 4.1.x? P.S. for Matrin Nowland - thanks for the help on the 'ON DUPLICATE KEY UPDATE' thing, I didn't realise it was a new thing in MySQL 4.1.0! goes away to kick himself ;-) -- Mark Benson http://homepage.mac.com/markbenson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] mysql to access
Use ODBC to use MySQL from either Access or VB (or any other language!) MT At 12:25 PM 12/17/2004, Perry, Matthew (Fire Marshal's Office) wrote: Here is the problem: I am currently using MySQL and PHP for this application but have realized recently that the bulk of my work is setting up three forms (add, view, modify) for each table I create. It takes hours for each table with MySQL and PHP but takes only minutes with Access. Also, other office administrators have been trained in Access instead of MySQL and will not be able to update my tables directly or set up new forms if I only use MySQL and PHP. On the other hand, PHP and ASP are easier and more flexible with user control options. Also, directly entering SQL can be much more efficient than using Access's embedded SQL applications. I really would like to exploit the advantages of both databases but do not know the best means by which to do this. We are creating a standard that will be followed by everyone in our department and need the best and most efficient solution possible. People move around from different positions constantly and it seems we are making radical changes to our system every year. Here are three questions with which I still need help: 1) Would it really make sense to split the data management between two linked databases (Access and MySQL) or would this just cause problems? 2) If I must use Access, should I use ASP(grrr) instead of PHP? 3) If I must use Access, should I use MS SQL Server(grrr) instead of MySQL? Thank you all for your time and patience. - Matthew -Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Friday, December 17, 2004 10:01 AM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql to access it would depend on what you need the app to do...if you are looking to use access to do reporting and/ or act as a front end, then it may be feasible... more details, if you care to share them, may help in this consideration bastien From: Perry, Matthew (Fire Marshal's Office) [EMAIL PROTECTED] To: Bastien Koert [EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql to access Date: Fri, 17 Dec 2004 09:59:25 -0600 You mean link the tables? I haven't yet considered this. - Matthew -Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Friday, December 17, 2004 9:42 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql to access why not just link the mysql to access? bastien From: Perry, Matthew (Fire Marshal's Office) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] mysql to access Date: Fri, 17 Dec 2004 09:33:39 -0600 Does anyone know of a FREE program that exports MySQL to access? The trial versions of the ones I have downloaded do not export all the records of the database. - Matthew -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] mysql to access
see embedded comments bastien From: Perry, Matthew (Fire Marshal's Office) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql to access Date: Fri, 17 Dec 2004 10:25:09 -0600 Here is the problem: I am currently using MySQL and PHP for this application but have realized recently that the bulk of my work is setting up three forms (add, view, modify) for each table I create. It takes hours for each table with MySQL and PHP but takes only minutes with Access. Also, other office administrators have been trained in Access instead of MySQL and will not be able to update my tables directly or set up new forms if I only use MySQL and PHP. Add / Edit should be the same page. You can add a little code to make some field uneditable if they should not be. You need to find ways to speed up the process. There is code available that will take your table structure and dump all the fields and sql statements, to initialize the variables with defaults. (get it here (http://www.weberdev.com/get_example-3978.html)). Then its mainly a matter of creating the forms and plugging it all together. Using a web form is even easier than using an access form, since all the code for menus and stuff is hiddedn away and links and form provide the navigation On the other hand, PHP and ASP are easier and more flexible with user control options. Also, directly entering SQL can be much more efficient than using Access's embedded SQL applications. The other thing is that to install this based on browser technology (ie ASP/PHP) you only need to install in one place, on the server. Otherwise you'll need to install it on every computer where the user is (time, travel and VERSIONING considerations here). Its easy and quicker to make those changes on a webserver than going around to all the users and making sure that they use the correct access application. I really would like to exploit the advantages of both databases but do not know the best means by which to do this. We are creating a standard that will be followed by everyone in our department and need the best and most efficient solution possible. People move around from different positions constantly and it seems we are making radical changes to our system every year. Here are three questions with which I still need help: 1) Would it really make sense to split the data management between two linked databases (Access and MySQL) or would this just cause problems? NO SPLITTING! Splitting the data is askng for a data management nightmare. Synchronicity will become a major problem as data changes in one place and not another. 2) If I must use Access, should I use ASP(grrr) instead of PHP? DO NOT USE ACCESS, its not nearly robust enought to handle the application, lack of ability to handle multiple users, security etc 3) If I must use Access, should I use MS SQL Server(grrr) instead of MySQL? not unless you have big dollars to spend? Its just not worth it. Thank you all for your time and patience. - Matthew -Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Friday, December 17, 2004 10:01 AM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql to access it would depend on what you need the app to do...if you are looking to use access to do reporting and/ or act as a front end, then it may be feasible... more details, if you care to share them, may help in this consideration bastien From: Perry, Matthew (Fire Marshal's Office) [EMAIL PROTECTED] To: Bastien Koert [EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql to access Date: Fri, 17 Dec 2004 09:59:25 -0600 You mean link the tables? I haven't yet considered this. - Matthew -Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Friday, December 17, 2004 9:42 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql to access why not just link the mysql to access? bastien From: Perry, Matthew (Fire Marshal's Office) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] mysql to access Date: Fri, 17 Dec 2004 09:33:39 -0600 Does anyone know of a FREE program that exports MySQL to access? The trial versions of the ones I have downloaded do not export all the records of the database. - Matthew -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] PHP, MySQL and phpMyAdmin versions...
-Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] huh? you can and should be able to upgrade to 4.0.x without too many problems. PHP 4.3.9 has no problems with that, nor will PHPMyAdmin. Moving to mySQL 4.1 will involve more pain as the protocols are vastly different and uses a different php library (mysqli). Which will, however, be almost completely pointless as the functionality he wants is only in 4.1. Also, it's not painful moving to mysql 4.1 at all - you can still use the mysql_* functions just fine. Mysqli_* functions are an option, not a requirement. Still, surely it can't be that hard to find mysql 4.1 for NT... http://dev.mysql.com/downloads/mysql/4.1.html#Windows Definitely read up on those upgrade/release notes! Windows binaries for php 4.10 / php 5 - these should be new enough to work with however the libraries bit works, so you'd just need to find the php mysql[i] windows library, driver, etc. whatever they call it. http://www.php.net/downloads.php Installing phpmyadmin is nothing, you just drop it in place essentially - works fine with php5 and mysql4.1 here. Cheers, - Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] characters problem
Bastien Koert wrote: Two years and you haven't heard of: addslashes? mysql_reaL_escape_string? or even something as simple as $comments = str_replace(','',$comments); to replace the one quote with two single quotes (don't forget to remove them on the display...) I thount that the first single-quote escapes the second and only 1 is stored. so I took 2 seconds to type 'mysql.com single quote' into google and ... well check out: http://dev.mysql.com/doc/mysql/en/String_syntax.html (personally I think the style CS on the site makes some of the information hard to digest) good luck. bastien From: Panos Yahoo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] characters problem Date: Fri, 17 Dec 2004 09:38:15 +0200 Dear All, I am using php and mysql the last two years, and I still cannot find the way to update a field on mysql from php that containts the single quotes ( ` and ' ) Examples Here is an example of my index.php file. I have to type something on Comments field - ? include(../configs/dates.inc); include(../configs/config.inc); echo br body bgcolor=#FFF8E1 text=#2003CF link=#2003CF vlink=#2003CF alink=#2003CF center form method=post action=add.php font face=\Comic Sans MS\Commentsbrtextarea rows=3 cols=40 name=mycomments tabind ex=22/textarea input type=submit name=Submit value=\Add Ticket\ input type=reset name=Reset value=\Clear Form\ ; mysql_close($myconn); ? - In the html text area, I am typing the following text : Hello My name is Panos and I'm from Greece The add.php file looks like this : - ? include(../configs/dates.inc); include(../configs/config.inc); $myquery=INSERT INTO `$table` (`comments`) VALUES ('$mycomments'); $myresult=mysql_db_query($db,$myquery); mysql_close($myconn); echo done; ? - ANd when i'm trying to see what was added on mysql, i have the following result : Hello My name is Panos and I\ - The field on mysql is TEXT Does anyone knows how can i resolve this problem? Thanks Panos -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php