麻烦逃避/杂项噩梦 [英] Trouble escaping / Misc nightmare

查看:43
本文介绍了麻烦逃避/杂项噩梦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对不起双重问题。我有一个很糟糕的时间搞清楚如何在我的mySQL数据库中转义撇号。也许他们必须使用mysql_real_escape_string在PHP中转义



这是代码:

http://www.gongfamily.net/code.txt

有问题的页面是:

http ://www.gongfamily.net/daevid.php


条目是N''existe Pas。有关专辑的信息应该在点击标题时左侧显示

,但只要有撇号,就不会发生

。这是一个逃避问题,我敢肯定,

但真正的问题是,我已经过头了!


第二个问题是在同一页上。您可以单击表格标题

对表格进行排序,但是当我点击组标题时,我收到了

错误:


"您的SQL语法有错误;检查

对应于您的MySQL服务器版本的手册,以获得正确的语法使用

在''Group ASC''附近的第1行

但是我在这里做什么都输了。尽管

不是非常精通PHP,但我已经倾注了代码。再一次,我在我的头上,并且会非常感谢任何帮助。


TIA


Ian

-

这不是一部喜剧,一部奇怪而又愚蠢的问题,这种重复,这种情况四处运行

在一个命运的圈子里? (Hermann Hesse)
http://www.bookstacks.org/

解决方案

''组''是列的无效名称! (mysql与

" GROUP BY"子句混淆)。


2005年6月28日12:32:57 -0700,saint exupery

< cr *************** @ gmail.com>写道:

'''组''是列的无效名称! (mysql与
GROUP BY子句混淆)。




LOL。非常感谢。这可能不会发生在我一百年的b $ b! :-)


Ian

-

这不是喜剧,陌生和愚蠢

重要的是,这个重复,在一个命运的圈子里跑来跑去?
? (Hermann Hesse)
http://www.bookstacks.org/


Ian Rastall(id*******@gmail.com)写道:

:2005年6月28日12:32:57 -0700,saint exupery

:< cr *************** @ gmail.com>写道:


:>''组''是列的无效名称! (mysql与

:>" GROUP BY"子句混淆。)


:LOL。非常感谢。这可能不会发生在我身上

:一百年! :-)


显然mysql可以使用`keyword`转义关键字。


但是,避免使用关键字是最好的选择。 (我喜欢

the_group)

-


这个空间不用于出租。

Sorry for the double question. I''m having a terrible time figuring out
how to escape apostrophes in my mySQL database. Perhaps they have to
be escaped in the PHP, using mysql_real_escape_string?

This is the code:

http://www.gongfamily.net/code.txt

The page in question is:

http://www.gongfamily.net/daevid.php

the entry being N''existe Pas. Information about the album should show
up on the left when the title is clicked on, but it doesn''t happen
whenever there''s an apostrophe. This is an escaping problem, I''m sure,
but the real problem is, I''m over my head!

The second problem is on the same page. You can click a table header
to sort the table, but when I click the ''Group'' header, I get the
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 ''Group ASC'' at line 1"

But I''m lost as to what to do here. I''ve poured over the code, despite
not being very well-versed in PHP. Again, I''m over my head, and would
truly appreciate any help.

TIA

Ian
--
Was it not a comedy, a strange and stupid
matter, this repetition, this running around
in a fateful circle? (Hermann Hesse)
http://www.bookstacks.org/

解决方案

''Group'' is an invalid name for a column! (mysql get confused with the
"GROUP BY" clause).


On 28 Jun 2005 12:32:57 -0700, "saint exupery"
<cr***************@gmail.com> wrote:

''Group'' is an invalid name for a column! (mysql get confused with the
"GROUP BY" clause).



LOL. Thank you so much. That would probably not have occurred to me in
a hundred years! :-)

Ian
--
Was it not a comedy, a strange and stupid
matter, this repetition, this running around
in a fateful circle? (Hermann Hesse)
http://www.bookstacks.org/


Ian Rastall (id*******@gmail.com) wrote:
: On 28 Jun 2005 12:32:57 -0700, "saint exupery"
: <cr***************@gmail.com> wrote:

: >''Group'' is an invalid name for a column! (mysql get confused with the
: >"GROUP BY" clause).

: LOL. Thank you so much. That would probably not have occurred to me in
: a hundred years! :-)

Apparently mysql can escape keywords using `keyword`.

However, avoiding keywords is the best bet. (I like things like
the_group )
--

This space not for rent.


这篇关于麻烦逃避/杂项噩梦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆