1
ChowSinWon
sql query with union
  • 2005/6/4 11:57

  • ChowSinWon

  • Just popping in

  • Posts: 6

  • Since: 2005/3/17


hi there.

i just stumbled on this little problem.
since i still am not familiar enough with xoops, it took me some time, to solve it.

i was using a MySQL query with UNION (available since MySQL 4.0) like that:
(SELECT a FROM table1UNION (SELECT a FROM table2)

that worked for me quite wonderful.
but XOOPS recognizes that query as UPDATE which makes usage of $xoopsDB->query($sql) in a GET request impossible.

i am aware, that queryF($sql) exists and it does work fine, but isn't it just wrong?

or maybe i am just missing something...

greetings
ric

2
Mithrandir
Re: sql query with union

Quote:
xoops recognizes that query as UPDATE

Not quite. XOOPS recognizes the query as a non-SELECT query - due to the ( before the SELECT.

Try the query without brackets.

3
ChowSinWon
Re: sql query with union
  • 2005/6/4 12:34

  • ChowSinWon

  • Just popping in

  • Posts: 6

  • Since: 2005/3/17


Quote:

Mithrandir wrote:
Quote:
xoops recognizes that query as UPDATE

Not quite. XOOPS recognizes the query as a non-SELECT query - due to the ( before the SELECT.

Try the query without brackets.


i see.
so the error message of debugger was wrong
Quote:
Database update not allowed during processing of a GET request


thanx.

4
Catzwolf
Re: sql query with union
  • 2005/6/4 12:35

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


I think queryF should be dropped from the database class and this method of securing the database on a 'get' should be handled by a switch in ( proxy or not) the class to stop the confusion.

Login

Who's Online

289 user(s) are online (143 user(s) are browsing Support Forums)


Members: 0


Guests: 289


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits