phpScheduleIt
May 18, 2013, 08:33:29 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Adding a new searchable field to search reservations - usage.php  (Read 664 times)
Azyrus
Newbie
*

Karma: 0
Posts: 28


« on: May 10, 2012, 08:42:11 PM »

Hello Nick and everyone =)

I have a few custom fields in my install of phpScheduleIt, now I would like to add these custom fields to the search reservations page (usage.php).

For starters I changed the summary field to our last_name field by changing all instances of summary to last_name in usage.php, usage.template.php and UsageDB.class.php and it WORKS =D

Secondly I wanted to add entirely new field (not modifying an old one). So I copied all instances of the original summary fields which are now last_name and pasted them below changing them to first_name. I thought this would work, but the search doesn't retrieve any data at all using ANY search field.

What am I missing? Thanks =D
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5403


WWW
« Reply #1 on: May 14, 2012, 01:38:01 PM »

All of the search code flows through from usage.php -> lib/db/UsageDB.php. My guess is the query will need to change slightly to use your new fields. It should work pretty much exactly like all of the other fields.
Logged
Azyrus
Newbie
*

Karma: 0
Posts: 28


« Reply #2 on: May 14, 2012, 11:27:10 PM »

Hey Nick thanks for the help it pointed me in the right direction =D
I needed to add an separate $searchtype on line 76 UsageDB.class.php >.<

Anyone looking for the solution here it is:
http://php.brickhost.com/forums/index.php?topic=11322.0
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!