473,404 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

HTML formatting for insert query.

Lets try this again...

Why does this query work when executed from the MySql Control Center, but
when executed from ASP it adds white spaces to the html tags?

Here's the query:

INSERT INTO myDbase.myTable (ArticleDate, ArticleNews)
VALUES('2003-11-26','<FONT face=\"Arial, Helvetica, sans-serif\"
color=#003300 size=4><STRONG>Some text</STRONG></FONT>')

Here's the result in the table if executed from the control center:
<FONT face="Arial, Helvetica, sans-serif" color=#003300 size=4><STRONG>Some
text</STRONG></FONT>

Here's the result of the same query when executed from ASP:
< FONT face = "Arial, Helvetica, sans-serif" color = #003300 size = 4 > <
STRONG > Some text < /STRONG > < /FONT >

Notice the spaces before and after all of the '< >' braces...

I thought the '< >' were not considered 'escape' characters?

Any info/guidance woiuld be greatly appreciated.

Warren M

Jul 19 '05 #1
2 3149
Warren wrote:
Here's the query:

INSERT INTO myDbase.myTable (ArticleDate, ArticleNews)
VALUES('2003-11-26','<FONT face=\"Arial, Helvetica, sans-serif\"
color=#003300 size=4><STRONG>Some text</STRONG></FONT>') Here's the result of the same query when executed from ASP:
< FONT face = "Arial, Helvetica, sans-serif" color = #003300 size = 4 > <
STRONG > Some text < /STRONG > < /FONT >

Notice the spaces before and after all of the '< >' braces...


I tried that with php and didn't have the same problem. I must assume
that you have a problem with asp, not with MySQL. And since I don't
really know asp, I can't help you about it. If you know some newsgroups
about asp they might know better.

Jul 19 '05 #2
Warren wrote:
Here's the query:

INSERT INTO myDbase.myTable (ArticleDate, ArticleNews)
VALUES('2003-11-26','<FONT face=\"Arial, Helvetica, sans-serif\"
color=#003300 size=4><STRONG>Some text</STRONG></FONT>') Here's the result of the same query when executed from ASP:
< FONT face = "Arial, Helvetica, sans-serif" color = #003300 size = 4 > <
STRONG > Some text < /STRONG > < /FONT >

Notice the spaces before and after all of the '< >' braces...


I tried that with php and didn't have the same problem. I must assume
that you have a problem with asp, not with MySQL. And since I don't
really know asp, I can't help you about it. If you know some newsgroups
about asp they might know better.

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Robert | last post by:
I need some help with formatting some text received from a database query. I am only selecting a single row per query so the formatting will only be performed on a single row. The rows I need to...
5
by: Bob Kaku | last post by:
I've created a MySQL database to store a large amount of text. Since the text data type in MySQL is limited to 255 characters, I added a BLOB column. I created an PHP input screen to enter the...
2
by: Squirrel | last post by:
Given the following piece of code, I was looking for suggestions on how to beautify the portion of the HTML where I jump out of php mode and back in again. The HTML does not have any indenting in...
3
by: RiGGa | last post by:
Hi, I am trung to create a mysql query string that contais two variables, the first holds a table name and the second holds the values as a tuple. I have tried the following however I can not...
0
by: Warren | last post by:
Hello all. I apologize if this has been asked a thousand times, but I must be pretty thick because I have searching through google for the last day, and still haven't any found concrete...
1
by: coder10 | last post by:
Two things 1. Why does ASP.Net not respect code formatting for the HTML tags. I mean, when I write my HTML, I try to use appropriate tabs and spaces and lines beween my tags, but when I save and...
4
by: Arthur Dent | last post by:
Hello all, ive been programming with ASP.NET since it came out, but am just getting my feet with now with v.2. Ive noticed something strange in the way my HTML tables get rendered with 2. I use...
2
by: edwinparker | last post by:
I'm currently working on a ASP.NET (C#) web application to process bids. Right now the user will enter in some rich text into a textbox (I'm using FreeTextBox for this) and the text gets saved as...
13
by: cj2 | last post by:
pages = 1 pages.tostring gives me "1" pages+1.tostring gives me "2.0" Why did it add the ".0" on there? I was looking for "2" and this screws me up. Actually this is what I was doing. In...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.