php - wrong parameter count in mysql_query -


i have error on php code. insert new row , error: wrong parameter count in mysql_query

<?php  include('../sec/inc_mysql_connect.php');  include 'googledistance.class.php';  $sql = "select vvbnummer, adres, postcode tblscheidsrechters";// echo($sql);  $result = mysql_query($sql);   $sql_sh = "select id, sporthaladres, postcode tblsporthal"; //echo('<br>' .    $sql_sh);  $result_sh = mysql_query($sql_sh);  while($record = mysql_fetch_array($result))  {   while($record_sh = mysql_fetch_array($result_sh))   { $fromaddress = $record['adres'] . ',' . $record['postcode']; //echo($fromaddress . '<br>');    $toaddress = $record_sh['sporthaladres'] . ',' . $record_sh['postcode'];  //echo($toaddress . '<br>');  $gd = new googledistance($fromaddress, $toaddress);  $vvb = $record['vvbnummer']; $shid =  $record_sh['id']; $afstand = $gd->getdistance(); $tijd = $gd->getduration();  ?> <body>      <p>scheidsrechter: <?php echo($record['vvbnummer']); ?></p>     <p>sporthal: <?php echo($record_sh['id']); ?></p>             <p>afstand in km (h/t): <?php echo $gd->getdistance()/1000 ; ?></p>     <p>tijd in minuten: <?php echo $gd->getduration()/60; ?></p>     <p>gevonden oorsprong: <?php echo $gd->getorigin(); ?></p>     <p>gevonden bestemming: <?php echo $gd->getdestination(); ?></p>     <hr /> </body> <?php  $sql = "insert klvv_sr_afstand_sh ( vvb_nr_sr, shid, afstand, tijd) values('$vvb', '$shid', '$afstand', '$tijd')"; echo($sql); $record = mysql_query(); } } ?> 

the error happens when insert row thx help

you'd need pass query server:

$record = mysql_query($sql); 

for clarification: in code stated $record = mysql_query();


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -