whats wrong here????
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc from materials' at line 1
this is the code
<?php
$serverName ="localhost";
$dbname="inventory";
$conn = mysql_connect($serverName,"root","");
if(!$conn) die("Connection error". mysql_connect_error());
else echo "connected successfully";
$desc = mysql_query("select desc from materials where code = 123",$conn ) or die (mysql_error());
mysql_close($conn); ?>