new module: custom links

Discuss about Group-Office development here

Moderator: Developers

badpenguin
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

require_once($GO_CONFIG->class_path.'/base/search.class.inc.php');
$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.id, sc.module, sc.name, 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')
[/b]

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?
mschering
Site Admin
Site Admin
Posts: 8284
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

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
Intermesh

Who is online

Users browsing this forum: No registered users and 2 guests

cron