DiscoTrio Posted November 1, 2009 Share Posted November 1, 2009 Well I know this is easy but I am trying to make a file where it is the simplest possible way to execute a mysql query. I need to fill in the php script with this: Database name, username, pass. And the sql query which I have. Here is the query: ALTER TABLE `snews` ORDER BY `id2` DESC Quote Link to comment Share on other sites More sharing options...
DiscoTrio Posted November 2, 2009 Author Share Posted November 2, 2009 errrrrrrrrr, hello.............? Quote Link to comment Share on other sites More sharing options...
DiscoTrio Posted November 2, 2009 Author Share Posted November 2, 2009 Dont be shy I just need a start..... Quote Link to comment Share on other sites More sharing options...
Mundo Posted November 2, 2009 Share Posted November 2, 2009 <?php mysql_connect("localhost", "username", "password") or die(mysql_error()); mysql_select_db("databasename") or die(mysql_error()); $query = mysql_query("ALTER TABLE `snews` ORDER BY `id2` DESC"); ?> It might also be useful for you to read the following: http://www.tizag.com/mysqlTutorial/index.php Quote Link to comment Share on other sites More sharing options...
DiscoTrio Posted November 2, 2009 Author Share Posted November 2, 2009 thanx! Quote Link to comment Share on other sites More sharing options...
Mundo Posted November 2, 2009 Share Posted November 2, 2009 Oops, made a typo. You might want to copy again. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.