new module: custom links

Discuss about Group-Office development here

Moderator: Developers

Posts: 12
Joined: Wed Nov 04, 2009 1:55 pm

new module: custom links

Postby badpenguin » Thu Mar 18, 2010 5:57 pm

I'm trying to develop a simple test module that track product serial numbers purchased by customer (its just to master the GO API).

I watched into the notes module but maybe something is wrong,

when the following code is executed:

Code: Select all

$search = new search();
$links_json = $search->get_latest_links_json($GO_SECURITY->user_id, $response['data']['serial'], 31);
the following error appear:

Code: Select all

Database error: Invalid SQL: SELECT SQL_CALC_FOUND_ROWS DISTINCT sc.acl_id, sc.user_id,, sc.module,, sc.description,sc.link_type, sc.type, sc.mtime FROM go_search_cache sc INNER JOIN go_acl a ON sc.acl_id=a.acl_id LEFT JOIN go_users_groups ug ON (ug.group_id=a.group_id) WHERE (a.user_id=1 OR ug.user_id=1) ORDER BY l.ctime DESC LIMIT 0,15
MySQL Error: 1054 (Unknown column 'l.ctime' in 'order clause')

i wonder where the "L" table is into the query, perhaps something wrong with "cache" and "build_index" functions.

Perhaps i should start using code from the modulegenerator?

Do i need to add some extra field (ctime, mtime) to my "product" table to have it as custom link?
Site Admin
Site Admin
Posts: 8339
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch

Re: new module: custom links

Postby mschering » Mon Mar 22, 2010 12:58 pm

It sorts on ctime which it shouldn't. What if you add more parameters to the global_search function?
Best regards,

Merijn Schering

Who is online

Users browsing this forum: No registered users and 1 guest