labtech
Database
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
sp_NetworkDeviceSimpleSearch
Parameters
Name
Type
Mode
search
varchar(75)
IN
page
int
IN
pagesize
int
IN
userid
int
IN
Definition
BEGIN PREPARE STMT FROM "Select a.DeviceID, b.Name, a.IPAddress, a.Name, a.Description, a.OpenPorts, a.Identity, a.NetBIOS, a.MAC, a.OS, a.IPAddress, a.SNMPComm, a.ComputerID from networkdevices a LEFT OUTER JOIN Locations b ON b.locationid = a.locationid where ( a.DeviceID like concat('%',?,'%') or b.Name like concat('%',?,'%') or a.Name like concat('%',?,'%') or a.Description like concat('%',?,'%') or a.OpenPorts like concat('%',?,'%') or a.Identity like concat('%',?,'%') or a.MAC like concat('%',?,'%') or a.OS like concat('%',?,'%') or a.IPAddress like concat('%',?,'%') or a.SNMPComm like concat('%',?,'%') or a.NetBIOS like concat('%',?,'%') ) and b.clientid in (Select clientid From UserSec Where UserID=?) order by a.Name ASC, b.Name ASC Limit ?,?"; SET @LIMIT = (page * pagesize) - pagesize; SET @s = search; SET @size = pagesize; SET @U = userid; EXECUTE STMT USING @s,@s,@s,@s,@s,@s,@s,@s,@s,@s,@s,@U,@LIMIT,@size; END