labtech
Database
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
sp_ComputerSimpleSearch
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.Domain like CONCAT('%', ?, '%') or a.UserName like CONCAT('%', ?, '%') or a.LastUserName like CONCAT('%', ?, '%') or a.OS like CONCAT('%', ?, '%') or a.WinDir like CONCAT('%', ?, '%') or a.Version like CONCAT('%', ?, '%') or a.BiosName like CONCAT('%', ?, '%') or a.BiosVer like CONCAT('%', ?, '%') or a.BiosMFG like CONCAT('%', ?, '%') or a.BiosFlash like CONCAT('%', ?, '%') or a.ServiceVersion like CONCAT('%', ?, '%') or a.DNSInfo like CONCAT('%', ?, '%') or a.TotalMemory like CONCAT('%', ?, '%') or a.LocalAddress like CONCAT('%', ?, '%') or a.RouterAddress like CONCAT('%', ?, '%') or a.UserAccounts like CONCAT('%', ?, '%') or a.MAC like CONCAT('%', ?, '%') or a.Shares like CONCAT('%', ?, '%') or a.AssetTag like CONCAT('%', ?, '%') or a.Comment like CONCAT('%', ?, '%') or v.Name 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,@s,@s,@s,@s,@s,@s,@s,@s,@s,@s,@s,@s,@s,@s,@s,@s,@U,@LIMIT,@size; END