Page 1 of 1

add another category

Posted: Sat Aug 07, 2010 7:15 am
by bexter
Script URL:
Version of script:2.2

Write your message below:

hi klemen,
i add another category..
now in my ticket have two category
category1 & category2 to selected in new_ticket
what i have done (basic 1st i think):

1.add new text in text.php for language

2.in database
i)add new table=categories2 (same structure with categories table)
ii)in users table=add new field=category2
iii)in tickets table=add new field=category2

in admin folder

3.create file manage_categories2.php so i can manage categories2

4.edit file manage_users.php so i can manage categories2 permission for users

5.add function hesk_myCategories2 in /inc/common.inc.php

6.edit file in admin/admin-submit_ticket.php

7.edit file in admin/new_ticket.php
include this sql statement

Code: Select all

	$sql = 'SELECT * FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'categories2` WHERE '.hesk_myCategories2('id').' ORDER BY `cat_order` ASC';
but its give me an error sql cannot run when i use this query

Code: Select all

WHERE '.hesk_myCategories2('id').'
can u help me klemen what must i do?

Posted: Sat Aug 07, 2010 9:09 am
by Klemen
Turn on Debug mode in settings, that should give a full error message that MySQL returns and can help find the problem.