1
Xtracted
Strange $xoopsDB->query problem
  • 2006/8/22 10:53

  • Xtracted

  • Not too shy to talk

  • Posts: 138

  • Since: 2004/1/7 2


I am building a module and a problem has appeared that I just cant figure out..

On ONE place in my code I do a update query to my database and nothing happens. It doesnt change the info in the database. I get no errors when I turn on the debugs in xoops. Nothing. Everything should work just fine its just that my database isnt updated.

$query $xoopsDB->query("UPDATE ".$xoopsDB->prefix("my_table") ." SET bla='333' WHERE id='1'");



I am using if, elseif and else to see if I have declared any variable in the file and execute the approperiate section of the code depending on what variable that has been declared.

A note is that it works on all other variables everywhere else in the code, its just THAT row that doesnt work when its called..

if I change the line to:
$query mysql_query("UPDATE ".$xoopsDB->prefix("my_table") ." SET bla='333' WHERE id='1'");


it works...



Ghaaa!

(using the latest XOOPS version ((not 2.x)) with the latest MySQL version)

2
Xtracted
Re: Strange $xoopsDB->query problem
  • 2006/8/22 10:57

  • Xtracted

  • Not too shy to talk

  • Posts: 138

  • Since: 2004/1/7 2


Update, I have been able to create a error notification! yay!



UPDATE xoops_table SET bla='0' WHERE id=2
Error number: 0
Error message: Database update not allowed during processing of a GET request

3
Herko
Re: Strange $xoopsDB->query problem
  • 2006/8/22 11:03

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


For this you need to use queryF(...).

Herko

Login

Who's Online

385 user(s) are online (340 user(s) are browsing Support Forums)


Members: 0


Guests: 385


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