how to change character to % character? [message #183319] |
Sun, 20 October 2013 16:27 |
Mr Oldies
Messages: 241 Registered: October 2013
Karma: 0
|
Senior Member |
|
|
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/
<?php
if ($show="none"){$song=$playme[$number][4];}
if ($show!="none") {$song=$playme[$show][4];}
echo 'jwplayer("player").setup({';
echo ' file: "'.$song.'.mp3",';
echo ' width: 480,';
echo ' height: 30,';
echo ' autostart:true';
echo '});';
?>
|
|
|
|
|
Re: how to change character to % character? [message #183324 is a reply to message #183323] |
Sun, 20 October 2013 17:04 |
Mr Oldies
Messages: 241 Registered: October 2013
Karma: 0
|
Senior Member |
|
|
On Sun, 20 Oct 2013 09:45:13 -0700, Evan Platt wrote:
> On Sun, 20 Oct 2013 12:27:17 -0400, richard <noreply(at)example(dot)com>
> wrote:
>
>> www.mroldies.net/200/
>
> Oh, so you ARE Mr. Oldies.
>
> Funny, you claimed you haven't posted with another nick in 3 years,
> yet you posted less than a month ago as Mr. Oldies.
evan, go over to fisherman's wharf and try out a puffer fish.
I hear they are delicious!
But you have claimed I have posted using other nicks such as RD Sandman.
Most people in this group and the other web help groups all know I am
Mroldies as I have posted that website under this nick numerous times in
the past.
So what?
Now take a one way trip to alcatraz.
|
|
|
|
Re: how to change character to % character? [message #183326 is a reply to message #183324] |
Sun, 20 October 2013 17:22 |
Evan Platt
Messages: 124 Registered: November 2010
Karma: 0
|
Senior Member |
|
|
On Sun, 20 Oct 2013 13:04:46 -0400, richard <noreply(at)example(dot)com>
wrote:
> But you have claimed I have posted using other nicks such as RD Sandman.
> Most people in this group and the other web help groups all know I am
> Mroldies as I have posted that website under this nick numerous times in
> the past.
> So what?
>
> Now take a one way trip to alcatraz.
You've also posted as horse.
Yes, everyone knows you are mr oldies, so you just admitted you lied.
"I have not posted with another nick in 3 years."
"yes, I posted as mr. oldies last week."
So which one is it, bullis?
How's that dome home coming along?
--
To reply via e-mail, remove The Obvious and .invalid from my e-mail address.
|
|
|
Re: how to change character to % character? [message #183330 is a reply to message #183319] |
Sun, 20 October 2013 18:04 |
Luuk
Messages: 329 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
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.......
|
|
|
Re: how to change character to % character? [message #183334 is a reply to message #183330] |
Sun, 20 October 2013 18:50 |
Mr Oldies
Messages: 241 Registered: October 2013
Karma: 0
|
Senior Member |
|
|
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.
|
|
|
solved! [message #183344 is a reply to message #183319] |
Sun, 20 October 2013 19:11 |
Mr Oldies
Messages: 241 Registered: October 2013
Karma: 0
|
Senior Member |
|
|
On Sun, 20 Oct 2013 12:27:17 -0400, 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.
>
Dufus was using the wrong array item number!
that was the main reason why I switched to using numbers instead of full
names!
So I wouldn't have to worry about the damn special characters.
That was the actual reason for the error message.
Or why the songs would not load.
|
|
|
|
|
Re: how to change character to % character? [message #183351 is a reply to message #183323] |
Mon, 21 October 2013 01:01 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
On 10/20/2013 12:45 PM, Evan Platt wrote:
> On Sun, 20 Oct 2013 12:27:17 -0400, richard <noreply(at)example(dot)com>
> wrote:
>
>> www.mroldies.net/200/
>
> Oh, so you ARE Mr. Oldies.
>
> Funny, you claimed you haven't posted with another nick in 3 years,
> yet you posted less than a month ago as Mr. Oldies.
>
Why aren't you answering his question? Maybe because you are an
ignorant troll?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|
Re: how to change character to % character? [message #183353 is a reply to message #183334] |
Mon, 21 October 2013 01:02 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
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).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|
Re: how to change character to % character? [message #183358 is a reply to message #183351] |
Mon, 21 October 2013 01:57 |
Mr Oldies
Messages: 241 Registered: October 2013
Karma: 0
|
Senior Member |
|
|
On Sun, 20 Oct 2013 21:01:32 -0400, Jerry Stuckle wrote:
> On 10/20/2013 12:45 PM, Evan Platt wrote:
>> On Sun, 20 Oct 2013 12:27:17 -0400, richard <noreply(at)example(dot)com>
>> wrote:
>>
>>> www.mroldies.net/200/
>>
>> Oh, so you ARE Mr. Oldies.
>>
>> Funny, you claimed you haven't posted with another nick in 3 years,
>> yet you posted less than a month ago as Mr. Oldies.
>>
>
> Why aren't you answering his question? Maybe because you are an
> ignorant troll?
He is. He's been harassing me for 5 years over any little thing he can.
even a simple typo will get his juices flowing for months.
|
|
|
Re: how to change character to % character? [message #183359 is a reply to message #183358] |
Mon, 21 October 2013 02:09 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
On 10/20/2013 9:57 PM, richard wrote:
> On Sun, 20 Oct 2013 21:01:32 -0400, Jerry Stuckle wrote:
>
>> On 10/20/2013 12:45 PM, Evan Platt wrote:
>>> On Sun, 20 Oct 2013 12:27:17 -0400, richard <noreply(at)example(dot)com>
>>> wrote:
>>>
>>>> www.mroldies.net/200/
>>>
>>> Oh, so you ARE Mr. Oldies.
>>>
>>> Funny, you claimed you haven't posted with another nick in 3 years,
>>> yet you posted less than a month ago as Mr. Oldies.
>>>
>>
>> Why aren't you answering his question? Maybe because you are an
>> ignorant troll?
>
> He is. He's been harassing me for 5 years over any little thing he can.
> even a simple typo will get his juices flowing for months.
>
He's just a troll who knows even less than most people here, Richard.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|
Re: how to change character to % character? [message #183363 is a reply to message #183358] |
Mon, 21 October 2013 06:18 |
Evan Platt
Messages: 124 Registered: November 2010
Karma: 0
|
Senior Member |
|
|
On Sun, 20 Oct 2013 21:57:48 -0400, richard <noreply(at)example(dot)com>
wrote:
> He is. He's been harassing me for 5 years over any little thing he can.
> even a simple typo will get his juices flowing for months.
Please show me where I've made fun of you for a typo.
<crickets>
Didn't think so bullis.
--
To reply via e-mail, remove The Obvious and .invalid from my e-mail address.
|
|
|
Re: how to change character to % character? [message #183367 is a reply to message #183353] |
Mon, 21 October 2013 09:55 |
Arno Welzel
Messages: 317 Registered: October 2011
Karma: 0
|
Senior Member |
|
|
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
|
|
|
Re: how to change character to % character? [message #183371 is a reply to message #183367] |
Mon, 21 October 2013 12:04 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
On 10/21/2013 5:55 AM, Arno Welzel wrote:
> 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 ;-)
>
>
That's another way. But don't confuse the poor guy.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|
Re: how to change character to % character? [message #183374 is a reply to message #183363] |
Mon, 21 October 2013 12:39 |
Scott Johnson
Messages: 196 Registered: January 2012
Karma: 0
|
Senior Member |
|
|
On 10/20/2013 11:18 PM, Evan Platt wrote:
> On Sun, 20 Oct 2013 21:57:48 -0400, richard <noreply(at)example(dot)com>
> wrote:
>
>> He is. He's been harassing me for 5 years over any little thing he can.
>> even a simple typo will get his juices flowing for months.
>
> Please show me where I've made fun of you for a typo.
>
> <crickets>
>
> Didn't think so bullis.
>
Is there a particular reason you like to answer your own questions?
Scotty
|
|
|
|