Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #11521
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Arno Welzel <usenet@arnowelzel.de> |
| Newsgroups | comp.lang.php |
| Subject | Re: how to change character to % character? |
| Date | Mon, 21 Oct 2013 11:55:46 +0200 |
| Lines | 50 |
| Message-ID | <5264FA22.6020703@arnowelzel.de> (permalink) |
| References | <z6vdxp5lrmnm.inx0tv64wlmj.dlg@40tude.net> <6jidja-ea4.ln1@luuk.invalid.lan> <tl4oa5agcfkl$.15luupt3h3ksi$.dlg@40tude.net> <l41ufd$6uc$3@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net 3Uep0n9BzNru1fJ31KnPegFOflaA/whUBgLWzj1Hu0P3XvQCl9 |
| Cancel-Lock | sha1:MlNEbqpqGJn+Pm0TZ8CP6kK0d7g= |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 |
| In-Reply-To | <l41ufd$6uc$3@dont-email.me> |
| Xref | csiph.com comp.lang.php:11521 |
Show key headers only | View raw
Am 21.10.2013 03:02, schrieb Jerry Stuckle: > On 10/20/2013 2:50 PM, richard wrote: >> On Sun, 20 Oct 2013 20:04:54 +0200, Luuk wrote: >> >>> On 20-10-2013 18:27, richard wrote: >>>> I noticed that whenever a song is clicked on that has an apostrophe in the >>>> name, an error is now being generated. >>>> The song still plays and the name is reported correctly. >>>> >>>> So how can I detect any and all 's within a string and convert them to the >>>> %27 version? >>>> >>>> I had a look at preg-match and don't think that will help. >>>> >>>> www.mroldies.net/200/ >>>> >>>> >>> >>> >>> Why do i see this 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 's Now Or >>> Never ',' It's Now Or Never ',1) ON DUPLICATE KEY UPDATE hits=hits+1' at >>> line 1 >>> >>> on this link: >>> http://www.mroldies.net/200/audiox1.php?play=6 >>> >>> Can you not see that this is not a proper MySQL statement? >>> >>> Nut you better fix this now than never....... >> >> Precisely why I am asking how to fix. >> The error stems from the fact that the echo statement "sees" a single quote >> as part of the structure of the statement itself. NOT as a string. >> IOW, "Hey stupid....your quotes don't match!" >> >> It is not a MYSQL problem. it is purely a syntax matter. >> > > As you have been told MANY, MANY times before. You need to escape ALL > of the strings you use when accessing ANY SQL database (not just MySQL). Or just use prepared statements ;-) -- Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
how to change character to % character? richard <noreply@example.com> - 2013-10-20 12:27 -0400
Re: how to change character to % character? Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2013-10-20 12:40 -0400
Re: how to change character to % character? richard <noreply@example.com> - 2013-10-20 13:06 -0400
Re: how to change character to % character? Evan Platt <evan@theobvious.espphotography.com.invalid> - 2013-10-20 09:45 -0700
Re: how to change character to % character? richard <noreply@example.com> - 2013-10-20 13:04 -0400
Re: how to change character to % character? Evan Platt <evan@theobvious.espphotography.com.invalid> - 2013-10-20 10:22 -0700
Re: how to change character to % character? Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-20 21:01 -0400
Re: how to change character to % character? richard <noreply@example.com> - 2013-10-20 21:57 -0400
Re: how to change character to % character? Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-20 22:09 -0400
Re: how to change character to % character? Evan Platt <evan@theobvious.espphotography.com.invalid> - 2013-10-20 23:18 -0700
Re: how to change character to % character? Scott Johnson <noonehome@chalupasworld.com> - 2013-10-21 05:39 -0700
Re: how to change character to % character? Evan Platt <evan@theobvious.espphotography.com.invalid> - 2013-10-21 06:31 -0700
Re: how to change character to % character? Luuk <luuk@invalid.lan> - 2013-10-20 20:04 +0200
Re: how to change character to % character? richard <noreply@example.com> - 2013-10-20 14:50 -0400
Re: how to change character to % character? Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-20 21:02 -0400
Re: how to change character to % character? Arno Welzel <usenet@arnowelzel.de> - 2013-10-21 11:55 +0200
Re: how to change character to % character? Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-21 08:04 -0400
solved! richard <noreply@example.com> - 2013-10-20 15:11 -0400
Re: how to change character to % character? Arno Welzel <usenet@arnowelzel.de> - 2013-10-20 21:17 +0200
Re: how to change character to % character? Luuk <luuk@invalid.lan> - 2013-10-20 21:50 +0200
csiph-web