Humm , i m not sure why i get an error...
SQL error: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression
i ll show my hole code it might help
Code: Select all
<?php
$connect = odbc_connect("tech_support", "kader", "edh") or die("Connection failed");
$query = "SELECT key FROM Clients";
$queryexe = odbc_do($connect, $query);
while(odbc_fetch_row($queryexe))
{
$varkey = odbc_result($queryexe, 1);
}
$date = $_POST['days']."-".$_POST['months']."-".$_POST['years'];
$nom = $_POST["nom"];
$centre = $_POST["centre"];
$phone = "(".$_POST["indicatif"].")"." ".$_POST["phone1"]."-".$_POST["phone2"];
$person = $_POST["person"];
$serial = $_POST["serial1"]." ".$_POST["serial2"]." ".$_POST["serial3"];
$machine = $_POST["machine"];
$ftp = $_POST["ftp"];
$fta = $_POST["fta"];
$tp = $_POST["tp"];
$key1 = $_POST["key1"];
$key2 = $_POST["key2"];
$key3 = $_POST["key3"];
$garantie = $_POST["garantie"];
$problem = $_POST["problem"];
$var = $varkey;
if ($var == "NULL") {
$var == 1;
}else{
$var++;
}
echo ("<tr align='center' class='textegris'>");
echo ("<td><a href='accueil_fr.php' class='textegris'>$centre</a></td>");
echo ("<td><a href='accueil_fr.php' class='textegris'>$nom</a></td>");
echo ("<td><a href='accueil_fr.php' class='textegris'>$phone</a></td>");
echo ("<td><a href='accueil_fr.php' class='textegris'>$var</a></td>");
echo ("</tr>");
odbc_close($connect);
$connect = odbc_connect("tech_support", "kader", "edh") or die("Connection failed");
$query = "INSERT INTO Clients ( thedate, centre, nom, phone, Derniere, machine, ftp, fta, tp, module1, module2, module3, garantie, probleme, key) VALUES ( '$date', '$centre', '$nom', '$phone', '$person', '$machine', '$ftp', '$fta', '$tp', '$key1', '$key2', '$key3', '$garantie', '$problem', '$var')";
$queryexe = odbc_do($connect, $query);
odbc_close($connect);
?>
that the way i use.. i only show the info of 4 field.. and each one i want to put an href on it so u can access info of ALL field on this peticular client...
(just for testing right now i just put accueil_fr.php as a link wich is nothing..it just says thx..)