SitePoint Sponsor |
|
User Tag List
Results 1 to 13 of 13
Thread: # character
-
May 3, 2001, 12:38 #1
- Join Date
- Jan 2001
- Location
- Florence, Italy
- Posts
- 48
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi,
I have this strange thing happening in my MySQL database whenever a visitor registers his/her company and in any of the fields uses the "#" character like e.g. in an address Bla Bla Street #456.
What happens is that when I back up the database with a dump file (using PHPMyAdmin) and the next time I use that backup file it will tell me that there was an error and only the rows up to that error are inserted. By trial & error I found out that the two suppliers I got this error with was because they used this character: by removing it from the back-up file I no longer had any problems re-creating the table.
Is there any way I can avoid this problem? Something like htmlspecialchars?
Another thing that happened once was that someone who registered used apostrophes in the text which normally isn't a problem, but this time in the database it got changed to something weird like "%&#". That's not exactly what it was but I can't remember now. And also that time the dump file didn't work because of the "#" character. Does this have to do with the character set their using?
Willow
-
May 3, 2001, 13:31 #2
- Join Date
- Oct 2000
- Location
- Nashvegas Baby!
- Posts
- 7,845
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I think it's because the POUND sign is the indication of a comment tag in mySQL.
Adobe Certified Coldfusion MX 7 Developer
Adobe Certified Advanced Coldfusion MX Developer
My Blog (new) | My Family | My Freelance | My Recipes
-
May 4, 2001, 00:17 #3
This problem is a real pain. After large research, I found that MySQL only looking for comments when you got more then one query seperated by ;
Meaning if you can seperate them good enough and run it one-by-one you will have no problem. I have made script that does a bit better job then MySQLAdmin at seperating queries and running then one-by-one. Reply if you interested in it.
-
May 4, 2001, 06:30 #4
- Join Date
- Jan 2001
- Location
- Florence, Italy
- Posts
- 48
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by creole
I think it's because the POUND sign is the indication of a comment tag in mySQL.- wonder why it's called that way.
In any event, just wondering if there isn't a SIMPLE way of escaping this character, like e.g. addslashes does with " "
Willow
-
May 4, 2001, 09:15 #5
No way of escaping it (at least I did not found one), only way is to run queries with it seperatly one by one.
-
May 4, 2001, 11:34 #6
- Join Date
- Oct 2000
- Location
- Nashvegas Baby!
- Posts
- 7,845
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It's not actually called the Pound sign.
I think it's called a Hash or an octohedral or something like that. In the states everyone just calls it the POUND sign though. Don't know why.Adobe Certified Coldfusion MX 7 Developer
Adobe Certified Advanced Coldfusion MX Developer
My Blog (new) | My Family | My Freelance | My Recipes
-
May 4, 2001, 13:56 #7
- Join Date
- Oct 2000
- Location
- Austin, TX
- Posts
- 1,438
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It's also a sharp sign.
-
May 4, 2001, 14:13 #8
- Join Date
- Jan 2001
- Location
- Florence, Italy
- Posts
- 48
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
And in Dutch and Italian it's called "hekje" and "cancelletto", respectively, which both translate into "gate".
Go figure.
-
May 4, 2001, 18:20 #9
The only true pound sign is £
*sings british national anthem*Last edited by DarkMonkey; May 4, 2001 at 18:22.
-
May 6, 2001, 23:44 #10
- Join Date
- Mar 2001
- Posts
- 3,537
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
-
May 7, 2001, 00:03 #11
dictionary.com:
hash
1. <character> "#", ASCII code 35.
Common names: number sign; pound; pound sign; hash; sharp; crunch; hex; INTERCAL: mesh. Rare: grid; crosshatch; octothorpe; flash; ITU-T: square, pig-pen; tictactoe; scratchmark; thud; thump; splat.
The pronunciation of "#" as "pound" is common in the US but a bad idea; Commonwealth Hackish has its own, rather more apposite use of "pound sign" (confusingly, on British keyboards the pound graphic happens to replace "#"; thus Britishers sometimes call "#" on a US-ASCII keyboard "pound", compounding the American error). The US usage derives from an old-fashioned commercial practice of using a "#" suffix to tag pound weights on bills of lading. The character is usually pronounced "hash" outside the US
2. <programming> hash coding.
3. The preferred term for a Perl associative array.
(1995-03-06)
-
May 7, 2001, 06:31 #12
- Join Date
- Oct 2000
- Location
- Nashvegas Baby!
- Posts
- 7,845
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
octothorpe...
that's the one I was trying to think of.Adobe Certified Coldfusion MX 7 Developer
Adobe Certified Advanced Coldfusion MX Developer
My Blog (new) | My Family | My Freelance | My Recipes
-
May 7, 2001, 06:45 #13
- Join Date
- Feb 2000
- Location
- England
- Posts
- 568
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by 7stud
please see:
www.MilleniumDomeFiasco.com
www.MilleniumBridgeDebacle.com
and
www.HaveToGetCompetentHealthCareInGermany.com
and
www.footandmouthcrisis.com
Bookmarks