title: mysqli_error not returning anything
body: <p>I have a php script which is supposed to insert a new row to a remote database. Something is not quite working as it should, but when I try to debug with <code>mysqli_error</code> it doesn't return anyting. Code as follows:</p>
  
  <pre><code>$connect = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname) or die("Unable to Connect to '$dbhost'");
  
  if (mysqli_connect_errno())
    {
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
    }
  
  $query = "INSERT INTO #DBname.TableName# (Section,Gender,WinningTeam,LosingTeam,FixtureD,FixtureT,Venue,Court,Texts,SetsWon,SetsLost,Winner_Score,Loser_Score) VALUES ($Section,$Gender,$WinningTeam,$LosingTeam,$FixtureD,$FixtureT,$Venue,$Court,$Texts,$SetsWon,$SetsLost,$Winner_Score,$Loser_Score)";              
  
  $result = mysqli_query($connect, $query) or die (mysqli_error());
  </code></pre>
  
  <p>The error message says <code>mysqli_error</code> expects exactly 1 paramater, 0 was given. However when I replace it with <code>mysqli_error($connect)</code> I get <em>Error 404 - php script not found on server</em>.</p>
  
  <p>Pretty sure I'm missing something obvious, can anyone help out?</p>
  
  <p>Kind regards</p>