labtech
Database
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
sp_PasswordSimpleSearch
Parameters
Name
Type
Mode
search
varchar(75)
IN
page
int
IN
pagesize
int
IN
userid
int
IN
Definition
BEGIN PREPARE STMT FROM "Select a.PasswordID, b.Name, c.Name, a.Title, a.UserName, a.Notes, a.clientid from Clients b, Passwords a LEFT OUTER JOIN Locations c ON c.locationid = a.locationid where a.clientid = b.clientid and ( a.PasswordID like concat('%',?,'%') or b.Name like concat('%',?,'%') or c.Name like concat('%',?,'%') or a.Title like concat('%',?,'%') or a.UserName like concat('%',?,'%') or a.Notes like concat('%',?,'%') ) and a.clientid in (Select clientid From UserSec Where UserID=?) order by a.Title ASC, b.Name ASC, c.Name Limit ?,?"; SET @LIMIT = (page * pagesize) - pagesize; SET @s = search; SET @size = pagesize; SET @U = userid; EXECUTE STMT USING @s,@s,@s,@s,@s,@s,@U,@LIMIT,@size; END