anser316 Posted March 30, 2008 Share Posted March 30, 2008 I get this warning on php: Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\wamp\www\project\Senior Sales Assistant\store.php on line 25 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\wamp\www\project\Senior Sales Assistant\store.php on line 25 The thing is, the actual sql query works on wamp server. $result =mysql_query("SELECT d.drug_id,d.drug_name,b.branch_details,i.reorder_level,i.reorder_quantity,i.total_stock,i.status FROM drugs d, branch_items i, branch b WHERE d.drug_id=i.drug_id AND b.branch_id=i.branch_id"); echo "<br><br>"; echo "<B>Ordered Items</B><p>"; echo "<table border='1'>"; echo "<tr> <th>DRUG ID</th> <th>DRUG NAME</th> <th>BRANCH</th><th>Reorder Level</th><th>Reorder Quantity</th><th>Total Stock</th><th>Status</th></tr>"; while($row = mysql_fetch_array( $result )) { echo "<tr><td>"; echo $row['drug_id']; echo "</td><td>"; echo $row['drug_name']; echo "</td><td>"; echo $row['branch_details']; echo "</td><td>"; echo $row['reorder_level']; echo "</td><td>"; echo $row['reorder_quantity']; echo "</td><td>"; echo $row['total_stock']; echo "</td><td>"; echo $row['status']; echo "</td><td>"; echo "<input type=checkbox name=ticked value='yes'>"; echo "</td></tr>"; } echo "</table>"; Link to comment https://forums.phpfreaks.com/topic/98678-i-have-an-error/ Share on other sites More sharing options...
anser316 Posted March 30, 2008 Author Share Posted March 30, 2008 sorry solved, i didnt put the connection in Link to comment https://forums.phpfreaks.com/topic/98678-i-have-an-error/#findComment-505011 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.