1
silentcry
Quick Access to the database.
  • 2007/6/22 14:21

  • silentcry

  • Just popping in

  • Posts: 7

  • Since: 2007/5/28


This will most likely come off as really stupid, but I'm still learning Xoops.

Basically I need to have a page run a quick check on a table in the database and return the result.

The page isn't part of any of my modules or anything like that, so I'm wondering can I just create the page, reference main_file, and get an instance of the database?

I've tried it, and when I run $result = $db->query($sql) I get a Resource ID #37. Which I think means it was ok, but when I try to do a db->fetchArray($result) there's nothing there..

2
kurak_bu
Re: Quick Access to the database.
  • 2007/6/22 14:33

  • kurak_bu

  • Quite a regular

  • Posts: 342

  • Since: 2005/9/5 1


in module "xoopscare" you can execute code for mysql

3
silentcry
Re: Quick Access to the database.
  • 2007/6/22 14:33

  • silentcry

  • Just popping in

  • Posts: 7

  • Since: 2007/5/28


You know, it sucks being a dumbass sometimes. I just realised I was working off the wrong database. This one has no records, the right one has many..

So it works..

4
versuri32
Re: Quick Access to the database.
  • 2007/6/27 8:53

  • versuri32

  • Just popping in

  • Posts: 4

  • Since: 2007/6/27


Learning too, so i need a good reply.
10q

Login

Who's Online

217 user(s) are online (133 user(s) are browsing Support Forums)


Members: 0


Guests: 217


more...

Donat-O-Meter

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

Latest GitHub Commits