1
Lance_
Module dev: DB and Table name Horror!! err Error?
  • 2006/8/23 23:26

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12


Hey,

In my attempt to port a script in modular form I have hit a snag.

1. The admin portion of the script is not within the XOOPS admin template.

2. There is a period(".") that is put between the database name (from mainfile.php) and the table names (from said moduled script). So of course the table username_xoopsdb._table_name cannot work. Where is that period from????


Cheers and thanks.
GDL-Web.com :: Website development.
Xoopslance.com::Freelancing and Projects
thelionsden-arena.net:: Clan/League/Ladder Hosting

2
Lance_
Re: Module dev: DB and Table name Horror!! err Error?
  • 2006/8/24 12:06

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12


::BUMP::
GDL-Web.com :: Website development.
Xoopslance.com::Freelancing and Projects
thelionsden-arena.net:: Clan/League/Ladder Hosting

3
Lance_
Re: Module dev: DB and Table name Horror!! err Error?
  • 2006/8/24 13:07

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12


Added bonus

I notice the Period should actually be the Prefix to the table name. So I'm not setting something somewhere.
GDL-Web.com :: Website development.
Xoopslance.com::Freelancing and Projects
thelionsden-arena.net:: Clan/League/Ladder Hosting

4
Herko
Re: Module dev: DB and Table name Horror!! err Error?
  • 2006/8/24 14:34

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


Check the script you wrote, as the period is often used to append data to a variable. Maybe there's a period in the wrong place there!

Herko

5
highlander
Re: Module dev: DB and Table name Horror!! err Error?
  • 2006/8/24 16:29

  • highlander

  • Not too shy to talk

  • Posts: 151

  • Since: 2004/12/5


1. does your admin page have the following structure ?
require_once '../../../include/cp_header.php';

xoops_cp_header();

//lots of code

xoops_cp_footer();


2. the XOOPS db class should take care of this.
$sql "select * from ".$xoopsDB->prefix("tablename")." where ...";


hope this is what you mean...

CU Highlander
So, I'm in the park wondering why frisbees get larger as they get closer when suddenly, it hits me...
http://www.AnimalPedigree.com

6
Lance_
Re: Module dev: DB and Table name Horror!! err Error?
  • 2006/8/24 18:52

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12


Thanks a bunch.

Figured out the problem was the Prefix from staring at the error long enough. What got me off track is the Period in the error, but that is just a error format thing, nothing to do with the actual problem.

The problem was no Prefix was being included with the queries.

highlander gave a nice way to include it. Thank you very much.

Now I will tackle the appearing withi the Admin framework. I tried quickly but only got the XOOPS Admin part, the middle blank. Wil try some more.


Cheers.
GDL-Web.com :: Website development.
Xoopslance.com::Freelancing and Projects
thelionsden-arena.net:: Clan/League/Ladder Hosting

Login

Who's Online

375 user(s) are online (313 user(s) are browsing Support Forums)


Members: 0


Guests: 375


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