SQL:All Skills published and displayed in there own groups such as Corporation Management etc...

From EVEDev
Jump to: navigation, search

Hey everyone I have used this for my website to display all the Skills by there groups like so

Corporation Management Gunnery Drone Etc....

please fill free to use them

They are not in proper order as the game is but i figured this should do for anyone that is new to PHP/MySQL

Corporation Management

 $sql = "SELECT groups.groupID,
       groups.groupName AS groupName,
       invTypes.typeName AS skillName,
       invTypes.description,
       invTypes.typeID
   FROM ( SELECT * FROM invGroups WHERE groupID = 266 ) AS groups
   INNER JOIN invTypes ON ( invTypes.groupID = groups.groupID )
   ORDER BY groupName;";
 $result = mysql_query($sql);
 while ($rows = mysql_fetch_array($result)) {
     echo "- <a href='skill_info.php?skillID=" . $rows['typeID'] . "'>" . $rows['skillName'] . "</a>
"; }


Drones

 $sql = "SELECT groups.groupID,
       groups.groupName AS groupName,
       invTypes.typeName AS skillName,
       invTypes.description,
       invTypes.typeID
   FROM ( SELECT * FROM invGroups WHERE groupID = 273 ) AS groups
   INNER JOIN invTypes ON ( invTypes.groupID = groups.groupID )
   ORDER BY groupName;";
 $result = mysql_query($sql);
 while ($rows = mysql_fetch_array($result)) {
     echo "- <a href='skill_info.php?skillID=" . $rows['typeID'] . "'>" . $rows['skillName'] . "</a>
"; }


Electronics

 $sql = "SELECT groups.groupID,
       groups.groupName AS groupName,
       invTypes.typeName AS skillName,
       invTypes.description,
       invTypes.typeID
   FROM ( SELECT * FROM invGroups WHERE groupID = 272 ) AS groups
   INNER JOIN invTypes ON ( invTypes.groupID = groups.groupID )
   ORDER BY groupName;";
 $result = mysql_query($sql);
 while ($rows = mysql_fetch_array($result)) {
     echo "- <a href='skill_info.php?skillID=" . $rows['typeID'] . "'>" . $rows['skillName'] . "</a>
"; }


Gunnery

 $sql = "SELECT groups.groupID,
       groups.groupName AS groupName,
       invTypes.typeName AS skillName,
       invTypes.description,
       invTypes.typeID
   FROM ( SELECT * FROM invGroups WHERE groupID = 255 ) AS groups
   INNER JOIN invTypes ON ( invTypes.groupID = groups.groupID )
   ORDER BY groupName;";
 $result = mysql_query($sql);
 while ($rows = mysql_fetch_array($result)) {
     echo "- <a href='skill_info.php?skillID=" . $rows['typeID'] . "'>" . $rows['skillName'] . "</a>
"; }


Industry

 $sql = "SELECT groups.groupID,
       groups.groupName AS groupName,
       invTypes.typeName AS skillName,
       invTypes.description,
       invTypes.typeID
   FROM ( SELECT * FROM invGroups WHERE groupID = 268 ) AS groups
   INNER JOIN invTypes ON ( invTypes.groupID = groups.groupID )
   ORDER BY groupName;";
 $result = mysql_query($sql);
 while ($rows = mysql_fetch_array($result)) {
     echo "- <a href='skill_info.php?skillID=" . $rows['typeID'] . "'>" . $rows['skillName'] . "</a>
"; }


Learning

 $sql = "SELECT groups.groupID,
       groups.groupName AS groupName,
       invTypes.typeName AS skillName,
       invTypes.description,
       invTypes.typeID
   FROM ( SELECT * FROM invGroups WHERE groupID = 267 ) AS groups
   INNER JOIN invTypes ON ( invTypes.groupID = groups.groupID )
   ORDER BY groupName;";
 $result = mysql_query($sql);
 while ($rows = mysql_fetch_array($result)) {
     echo "- <a href='skill_info.php?skillID=" . $rows['typeID'] . "'>" . $rows['skillName'] . "</a>
"; }


Mechanic

 $sql = "SELECT groups.groupID,
       groups.groupName AS groupName,
       invTypes.typeName AS skillName,
       invTypes.description,
       invTypes.typeID
   FROM ( SELECT * FROM invGroups WHERE groupID = 269 ) AS groups
   INNER JOIN invTypes ON ( invTypes.groupID = groups.groupID )
   ORDER BY groupName;";
 $result = mysql_query($sql);
 while ($rows = mysql_fetch_array($result)) {
     echo "- <a href='skill_info.php?skillID=" . $rows['typeID'] . "'>" . $rows['skillName'] . "</a>
"; }


Engineering

 $sql = "SELECT groups.groupID,
       groups.groupName AS groupName,
       invTypes.typeName AS skillName,
       invTypes.description,
       invTypes.typeID
   FROM ( SELECT * FROM invGroups WHERE groupID = 271 ) AS groups
   INNER JOIN invTypes ON ( invTypes.groupID = groups.groupID )
   ORDER BY groupName;";
 $result = mysql_query($sql);
 while ($rows = mysql_fetch_array($result)) {
     echo "- <a href='skill_info.php?skillID=" . $rows['typeID'] . "'>" . $rows['skillName'] . "</a>
"; }


Navigation

 $sql = "SELECT groups.groupID,
       groups.groupName AS groupName,
       invTypes.typeName AS skillName,
       invTypes.description,
       invTypes.typeID
   FROM ( SELECT * FROM invGroups WHERE groupID = 275 ) AS groups
   INNER JOIN invTypes ON ( invTypes.groupID = groups.groupID )
   ORDER BY groupName;";
 $result = mysql_query($sql);
 while ($rows = mysql_fetch_array($result)) {
     echo "- <a href='skill_info.php?skillID=" . $rows['typeID'] . "'>" . $rows['skillName'] . "</a>
"; }


Missile Launcher Operations

 $sql = "SELECT groups.groupID,
       groups.groupName AS groupName,
       invTypes.typeName AS skillName,
       invTypes.description,
       invTypes.typeID
   FROM ( SELECT * FROM invGroups WHERE groupID = 256 ) AS groups
   INNER JOIN invTypes ON ( invTypes.groupID = groups.groupID )
   ORDER BY groupName;";
 $result = mysql_query($sql);
 while ($rows = mysql_fetch_array($result)) {
     echo "- <a href='skill_info.php?skillID=" . $rows['typeID'] . "'>" . $rows['skillName'] . "</a>
"; }


Trade

 $sql = "SELECT groups.groupID,
       groups.groupName AS groupName,
       invTypes.typeName AS skillName,
       invTypes.description,
       invTypes.typeID
   FROM ( SELECT * FROM invGroups WHERE groupID = 274 ) AS groups
   INNER JOIN invTypes ON ( invTypes.groupID = groups.groupID )
   ORDER BY groupName;";
 $result = mysql_query($sql);
 while ($rows = mysql_fetch_array($result)) {
     echo "- <a href='skill_info.php?skillID=" . $rows['typeID'] . "'>" . $rows['skillName'] . "</a>
"; }


Spaceship Command

 $sql = "SELECT groups.groupID,
       groups.groupName AS groupName,
       invTypes.typeName AS skillName,
       invTypes.description,
       invTypes.typeID
   FROM ( SELECT * FROM invGroups WHERE groupID = 257 ) AS groups
   INNER JOIN invTypes ON ( invTypes.groupID = groups.groupID )
   ORDER BY groupName;";
 $result = mysql_query($sql);
 while ($rows = mysql_fetch_array($result)) {
     echo "- <a href='skill_info.php?skillID=" . $rows['typeID'] . "'>" . $rows['skillName'] . "</a>
"; }


Social

 $sql = "SELECT groups.groupID,
       groups.groupName AS groupName,
       invTypes.typeName AS skillName,
       invTypes.description,
       invTypes.typeID
   FROM ( SELECT * FROM invGroups WHERE groupID = 278 ) AS groups
   INNER JOIN invTypes ON ( invTypes.groupID = groups.groupID )
   ORDER BY groupName;";
 $result = mysql_query($sql);
 while ($rows = mysql_fetch_array($result)) {
     echo "- <a href='skill_info.php?skillID=" . $rows['typeID'] . "'>" . $rows['skillName'] . "</a>
"; }


Science

 $sql = "SELECT groups.groupID,
       groups.groupName AS groupName,
       invTypes.typeName AS skillName,
       invTypes.description,
       invTypes.typeID
   FROM ( SELECT * FROM invGroups WHERE groupID = 270 ) AS groups
   INNER JOIN invTypes ON ( invTypes.groupID = groups.groupID )
   ORDER BY groupName;";
 $result = mysql_query($sql);
 while ($rows = mysql_fetch_array($result)) {
     echo "- <a href='skill_info.php?skillID=" . $rows['typeID'] . "'>" . $rows['skillName'] . "</a>
"; }

Thanks ~John Grissom 3 Madam Mika

Personal tools