10 messages in com.mysql.lists.perlRe: MAY DAY! MAY DAY!! Clarify :datat...
FromSent OnAttachments
Mehdi Ali Khan22 Dec 1999 03:44 
Willy Gielen22 Dec 1999 03:53 
pri...@pspl.co.in22 Dec 1999 04:03 
Benjamin Pflugmann22 Dec 1999 05:14 
Jochen Wiedmann22 Dec 1999 10:05 
C. Jon Larsen22 Dec 1999 10:34 
Willy Gielen23 Dec 1999 00:26 
Roland Becker23 Dec 1999 00:54 
Jochen Wiedmann23 Dec 1999 13:51 
Jochen Wiedmann23 Dec 1999 14:08 
Subject:Re: MAY DAY! MAY DAY!! Clarify :datatype TEXT/BLOB
From:Jochen Wiedmann (jo@ispsoft.de)
Date:12/22/1999 10:05:17 AM
List:com.mysql.lists.perl

Willy Gielen wrote:

I think the problem is simply that your text contains a single quote ('), which tells mysql that your text is finished ad this point. Everything after that he can't decipher. A simple way to prevent this from happening is before writing your SQL statement, you can replace all quotes with another character or string (for example §§). When you read back the record, you replace the chosen string with the original quote.

Horrible! :-)

You need no replacements or something similar. All you need is quoting the special characters with a backslash. As in

insert into foo values ('Tim o\'Reilly')

With DBD::mysql use either of

$name = "Tim o'Reilly"; $dbh->do("insert into foo values (" . $dbh->quote($name) . ")");

or

$dbh->do("insert into foo values (?)", undef, $name);

Bye,

Jochen

Willy

-----Original Message----- From: Mehdi Ali Khan [mailto:mame@hd2.dot.net.in] Sent: Mittwoch, 22. Dezember 1999 12:45 To: ja@lists.mysql.com Cc: deve@lists.mysql.com; msql@lists.mysql.com Subject: MAY DAY! MAY DAY!! Clarify :datatype TEXT/BLOB

Hi Everybody,

We want a clarify from you

1)

We created a table xx as follows

create table xx( x1 char(10), x2 text)

Supose we want to insert a text of size containing 500 characters into that table with a query statement

"insert into xx values('123456789x','The Brooklyn Tabernacle has become world famous as a church of miracles a church that has flourished amidst the poverty and crime of one of Brooklyn's harshest most unforgiving neighborhoods. A place where professional men and women former prostitutes pimps drug addicts homeless people and transvestites gather to worship their powerful and merciful God. Fall on Your Knees is a book that will lead you on a journey to spiritual awakening. In it Jim Cymbala pastor of he Brooklyn Tabernacle shares')"

it shows error as follows

parse error near 's harshest most unforgiving neighborhoods. A place where professional men and wo' at line 1

But from your manual data type TEXT supports maximum of 655535 characters TEXT and BLOB A `TEXT'/`BLOB' with max length of L+2 65535 characters.

Why it won't support here.

we also tested with change of TEXT datatype to BLOB. But same problem.

Is there any wrong in the query statement.

2)

We faced problem for creating a database with password protection

WeI execute following query in mysql database

"insert into user values('localhost','mak',password('mak10'),'Y','Y','Y','Y','Y','Y','Y','Y',' Y','Y')"

Also we executed mysqladmin reload at command prompt after executing the above query

But we are unable to enter to the user with mysql -u mak -p it asks password

But it shows the error "Access denied for User: 'mak@127.0.0.1' (Using password:YES)"

we followed according to manual.

we are using mysql 3.21.29a-gamma for win32-3.21

Please reply with clear explanation.

Thanks KSatyanarayana

To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, e-mail msql@lists.mysql.com instead.