[PHP-DB] Re: escape characters

2004-03-22 Thread Jimmy Brock
Matt, love your show! Use the addslahses function to escape ' \ characters. See http://php.net/addslashes for details. Jimmy Brock Matthew Perry [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am trying to allow my users to enter quotes in their strings. For instance instead of

Re: [PHP-DB] Re: escape characters

2004-03-22 Thread Filip de Waard
On Mar 22, 2004, at 12:17 PM, Jimmy Brock wrote: Matt, love your show! Use the addslahses function to escape ' \ characters. See http://php.net/addslashes for details. Actually, you shouldn't use addslashes, but a database specific function like mysql_escape_string().

[PHP-DB] mySQL Parse Error

2004-03-22 Thread Nadim Attari
Hi, I have a table: CREATE TABLE `cashmire` (`id` smallint(3) unsigned NOT NULL auto_increment, `itemcode` varchar(25) NOT NULL default '', `collection` char(2) NOT NULL default 'cl', `promotion` char(1) default 'n', `bestSeller` char(1) default 'n', `newArrival` char(1) default 'n', `size`

Re: [PHP-DB] mySQL Parse Error

2004-03-22 Thread jeffrey_n_Dyke
I have a table: CREATE TABLE `cashmire` (`id` smallint(3) unsigned NOT NULL auto_increment, `itemcode` varchar(25) NOT NULL default '', `collection` char(2) NOT NULL default 'cl', `promotion` char(1) default 'n', `bestSeller` char(1) default 'n', `newArrival` char(1) default 'n', `size`

Re: [PHP-DB] mySQL Parse Error

2004-03-22 Thread Terry Riley
Your field name is 'colour', you are inserting into 'color' ? --Original Message- Hi, I have a table: CREATE TABLE `cashmire` (`id` smallint(3) unsigned NOT NULL auto_increment, `itemcode` varchar(25) NOT NULL default '', `collection` char(2) NOT NULL default

Re: [PHP-DB] mySQL Parse Error

2004-03-22 Thread Terry Riley
You are also trying to insert '8400' (characters) into a mediumint (price)? --Original Message- Hi, I have a table: CREATE TABLE `cashmire` (`id` smallint(3) unsigned NOT NULL auto_increment, `itemcode` varchar(25) NOT NULL default '', `collection` char(2) NOT

Re: [PHP-DB] mySQL Parse Error

2004-03-22 Thread John W. Holmes
Nadim Attari wrote: insert into cashmire ('itemcode', 'collection', 'promotion', 'bestSeller', You should not have quotes around the column names. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com

[PHP-DB] escape chars continued

2004-03-22 Thread matthew perry
Filip de Waard wrote: On Mar 22, 2004, at 12:17 PM, Jimmy Brock wrote: Matt, love your show! Use the addslahses function to escape ' \ characters. See http://php.net/addslashes for details. Actually, you shouldn't use addslashes, but a database specific function like mysql_escape_string().

Re: [PHP-DB] escape chars continued

2004-03-22 Thread John W. Holmes
From: matthew perry [EMAIL PROTECTED] Actually I think the problem is before you can use either addslashes or mysql_escape_string() functions. The value with or ' never reaches the database. I think I need a way to ignore quotes for input values in HTML. Say I have this: input type=text

[PHP-DB] tick mark `

2004-03-22 Thread Craig Hoffman
Why is it when I have this ` tick mark in my query it works fine, but when I remove them it I get an error? Error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'interval, heartrate, morning_hr,

Re: [PHP-DB] tick mark `

2004-03-22 Thread jeffrey_n_Dyke
Why is it when I have this ` tick mark in my query it works fine, but when I remove them it I get an error? ___ This tells to mysql to NOT treat the word as the reserved word that it _may_ be, but use it literally. and interval, i believe, is a reserved word. It is much like escaping

[PHP-DB] Looking for simpler way to do this...

2004-03-22 Thread -{ Rene Brehmer }-
I'm working with PHP 4.3.0 w. MySQL 4.0.14b on Windows XP I've written my own (pretty advanced actually - or it will be once I get the code completed) forum system (why? because I wanted to learn how to handle relational databases with PHP/MySQL, and then I just decided to complete the thing)

[PHP-DB] Re: Looking for simpler way to do this...

2004-03-22 Thread Justin Patrin
-{ Rene Brehmer }- wrote: I'm working with PHP 4.3.0 w. MySQL 4.0.14b on Windows XP I've written my own (pretty advanced actually - or it will be once I get the code completed) forum system (why? because I wanted to learn how to handle relational databases with PHP/MySQL, and then I just

[PHP-DB] RE: escape chars continued

2004-03-22 Thread Brock Jimmy D Contr DODHSR5
In your sample code the value is being truncated because size=2 -- so only 2 characters are being assigned to $_POST['Q'] Addslahses should work... Based on your example here is how (I changed the size to 50: input type=text size=50 name=Q And my user enters:2 copper tubing $q =

[PHP-DB] Re: Looking for simpler way to do this...

2004-03-22 Thread Frank Flynn
Rene, Here are my thoughts: In general don't ever use select * ... yes it works fine but it's cleaner to always spell out the columns you expect. Also you are often returning data you don't need (overhead for the server). If you ever alter or add a column you could mess up your code but not

Re: [PHP-DB] RE: escape chars continued

2004-03-22 Thread John W. Holmes
From: Brock Jimmy D Contr DODHSR5 [EMAIL PROTECTED] When you want to display this value from the database onto your webpage use stripslashes stripslashes($row['q']; // this will remove the backslash that was inserted from addslashes You don't need to use stripslashes on the data pulled from

[PHP-DB] how to work with www.ups.com.mx???

2004-03-22 Thread Desi
I need a module in PHP to get the rates from this service, the tools are in XML but I need the module in PHP, to give the size and the weight and get the rate from this module. If you have work with this, please help me, or tell me if you can made it, how much will cost, and the time you can send

[PHP-DB] Re: How to simplify DB creation?

2004-03-22 Thread Thierry B.
You have also this IDE : http://www.codecharge.com -- Click below to answer / cliquez ci dessous pour me repondre http://cerbermail.com/?MQkxTL4vUP Michal Masa [EMAIL PROTECTED] a écrit dans le message de news:[EMAIL PROTECTED] Hi, We plan to write a simple DB with app. 10 tables. Are there

[PHP-DB] Re: how to work with www.ups.com.mx???

2004-03-22 Thread Justin Patrin
Desi wrote: I need a module in PHP to get the rates from this service, the tools are in XML but I need the module in PHP, to give the size and the weight and get the rate from this module. If you have work with this, please help me, or tell me if you can made it, how much will cost, and the time

[PHP-DB] [ANNOUNCEMENT] Propel 1.0-alpha1 released

2004-03-22 Thread Hans Lellelid
After a long period of quite intense development, the Propel team is pleased to announce the release of Propel 1.0.0-alpha1. Propel is an object persistence layer for PHP5 based on Apache Torque. In practical terms, Propel allows you to use objects instead of SQL to read and write rows in your

Re: [PHP-DB] [ANNOUNCEMENT] Propel 1.0-alpha1 released

2004-03-22 Thread Filip de Waard
On Mar 23, 2004, at 1:42 AM, Hans Lellelid wrote: After a long period of quite intense development, the Propel team is pleased to announce the release of Propel 1.0.0-alpha1. I haven't studied the project thoroughly yet, but I must say that your website looks very nice. Especially when you

[PHP-DB] ANN: Released extensive Metastorage documentation

2004-03-22 Thread Manuel Lemos
Hello, New and improved Metastorage documentation materials were released with the intention of helping developers to get started with this software development productivity tool and quickly deploy their PHP applications. Besides the Metastorage reference manual that already existed and was

Re: [PHP-DB] Store a File (any type) in MySQL

2004-03-22 Thread Daniel Crespo
Ok, I'll consider it... But just, please, could you give me an example code of what I want to do? Thanks a lot. Bruno Santos [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] Daniel Crespo wrote: Hi everybody... Anyone knows how to store a file (any type) in MySQL? Thanks

Re: [PHP-DB] tick mark `

2004-03-22 Thread Doug Thompson
Craig: I don't see a reply to your question in today's posts. Backticks or tick marks allow you to use reserved words for column names. Interval is a reserved word. Hope you weren't waiting this long for a response. Doug Thompson Craig Hoffman wrote: Why is it when I have this ` tick mark in

Re: [PHP-DB] mySQL Parse Error

2004-03-22 Thread Nadim Attari
You should not have quotes around the column names. Yea. that was the problem... 'color' a was trivial error ! i got it at home after office hours!!! Seems that a break is necessary when things go wrong !!! Thnx Nadim Attari -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,