labtech
Database
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
sp_ComputerFastSimpleSearch
Parameters
Name
Type
Mode
search
varchar(75)
IN
page
int
IN
pagesize
int
IN
userid
int
IN
Definition
BEGIN PREPARE STMT FROM "Select a.ComputerID, b.Name, a.Name as CompName, a.Domain, a.UserName, a.LastUserName, a.OS, a.WinDir, a.Version, a.Biosname, a.BiosVer, a.BiosMFG, a.BiosFlash, a.TotalMemory, a.LocalAddress, a.RouterAddress, a.AssetTag, a.Comment,v.Name, a.MAC, a.ServiceVersion, a.DNSInfo, a.Shares from computers a join clients b on a.clientid = b.clientid left Join virusscanners v on a.VirusScanner=v.vscanid where ( a.ComputerID like CONCAT('%', ?, '%') or b.Name like CONCAT('%', ?, '%') or a.Name like CONCAT('%', ?, '%') or a.UserName like CONCAT('%', ?, '%') or a.ServiceVersion like CONCAT('%', ?, '%') or a.MAC like CONCAT('%', ?, '%') or a.LocalAddress like CONCAT('%', ?, '%') or a.RouterAddress like CONCAT('%', ?, '%') ) and a.computerid in (Select ComputerID From UserSec Where UserID=?) order by b.Name ASC, a.Name ASC LIMIT ?,?"; SET @LIMIT = (page * pagesize) - pagesize; SET @size = pagesize; SET @s = search; SET @U = userid; EXECUTE STMT USING @s,@s,@s,@s,@s,@s,@s,@s,@U,@LIMIT,@size; END