Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Thu Mar 28, 2024 11:17 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
PostPosted: Thu Feb 04, 2010 1:50 am 
Offline
Newbie

Joined: Thu Jun 04, 2009 5:53 am
Posts: 9
Hi all - I have a very simple query that shows me systems by BIOS date, to assist with evergreening:

[code]<?php

$query_array=array("headline"=>__("List all BIOS Dates"),
"sql"=>"SELECT * FROM bios, system
WHERE bios_uuid = system_uuid",
"sort"=>"bios_version",
"dir"=>"ASC",
"get"=>array("file"=>"system.php",
"title"=>__("Go to System"),
"var"=>array("pc"=>"%system_uuid",
"view"=>"summary",
),
),
"fields"=>array("10"=>array("name"=>"system_uuid",
"head"=>__("UUID"),
"show"=>"n",
),
"20"=>array("name"=>"bios_version",
"head"=>__("BIOS Release Date"),
"show"=>"y",
),
"30"=>array("name"=>"net_ip_address",
"head"=>__("IP"),
"show"=>"y",
"link"=>"y",
),
"40"=>array("name"=>"system_name",
"head"=>__("Hostname"),
"show"=>"y",
"link"=>"y",
),
"50"=>array("name"=>"net_user_name",
"head"=>__("Network User"),
"show"=>"y",
"link"=>"y",
),
"60"=>array("name"=>"net_domain",
"head"=>__("Domain"),
"show"=>$show_domain,
),
"70"=>array("name"=>"system_os_name",
"head"=>__("OS"),
"show"=>$show_os,
),
"80"=>array("name"=>"system_service_pack",
"head"=>__("Servicepack"),
"show"=>$show_service_pack,
),
"90"=>array("name"=>"system_timestamp",
"head"=>__("Date Audited"),
"show"=>$show_date_audited,
),
"100"=>array("name"=>"system_system_type",
"head"=>__("System Type"),
"show"=>$show_type,
"align"=>"center",
),
"110"=>array("name"=>"system_description",
"head"=>__("Description"),
"show"=>$show_description,
),


),
);
?>[/code]

I would like to replace the Description column with the system_man_description field since it's here where admins will put info like "hack box - do not upgrade"...it seems more convenient than relying on the computer description local to each PC. However I'm no SQL expert and can't quite grasp what needs to change in order for this to work. I'm sure I need to add system_man into the SELECT statement and change the array name to system_man_description, but that doesn't quite do it. Can someone please assist?

Thanks,

-Doug


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 11, 2010 2:19 pm 
Offline
Newbie

Joined: Thu Jun 04, 2009 5:53 am
Posts: 9
Got it.

After several hours of head-scratching, it occurred to me that I simply don't know enough SQL. But I do know MS Access. So I linked the requisite tables in Access via ODBC, got the query exactly as I wanted inside Access, then switched to SQL View and copied/pasted the results into my .php file. Bingo! Now that I know I can do this, I feel quite liberated.


Top
 Profile  
Reply with quote  
PostPosted: Sat Feb 13, 2010 3:18 am 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
Good tip.

I tend to use the SQL query tool in OpenOffice Database to do something similar. ... and you thought I was a SQL genius :oops: oops, sorry to spoil the illusion.

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group