Hello , I was working on this script out of the idea of this and because I'm trying to get better at PHP. It was a pain doing this for a newbie like me but after some references from Google and Secured I got it done.
Script
ScreenshotCode:<?php // Newest Clan - Military $_MSSQL[Host] = "\SQLEXPRESS"; $_MSSQL[User] = "sa"; $_MSSQL[Pass] = ""; $_MSSQL[DBNa] = "GunzDB"; $r = mssql_connect($_MSSQL[Host], $_MSSQL[User], $_MSSQL[Pass]) or die("Cant connect to database"); mssql_select_db($_MSSQL[DBNa], $r) or die("Selection Failed"); $newclan = mssql_query("SELECT TOP 1 * FROM CLAN WHERE DeleteFlag = 0 ORDER BY regdate DESC"); $row = mssql_fetch_row($newclan); if(mssql_num_rows($newclan) != 1) { echo "No Data!"; } else { echo "The Last Clan Created was $row[1] and it was created on $row[9]"; } ?>
Credits
Secured - Showing me how to get it done after countless mistakes(Didnt use your way)
iCreamPie(Rodi) - Making the script and from where I took the idea
Google - Helping Me along the way
SuperWaffle - Giving me deleteflag.
Please Click The Like Button + Rep If You Like




Reply With Quote![[PHP]Last Clan Created](http://ragezone.com/hyper728.png)


