As a complete php / sql noob, I tried to configure very simple on the server. I have a db with a table and I am trying to read it on a php page. Here is the relevant part of my code:
<?php $con = mysql_connect("localhost", "----", "----") or die(mysql_error()); mysql_select_db("my_db") or die ("Select db fail!"); $ings = mysql_query($con, "SELECT * FROM Table") or die("Query fail: " . mysql_error()); mysql_close($con); ?>
Output:
Query fail:
I canβt circle my head. mysql_error does not return anything. I tried mysql_errno and it returns 0 , I tried mysql_num_rows($ings) and returns nothing.
Any insight?
source share