Page 1 of 1

[SOLVED] Upload in database error

Posted: Wed Aug 25, 2004 4:19 pm
by Draco_03

Code: Select all

$sql_update = "UPDATE loan_clients SET 
	`fname`='$fname', `lname`='$lname', `ciename`='$ciename'
	WHERE clientsid='$clientsid'";
this code works perfectly..NOW when i try to add the pother field in my database

like this

Code: Select all

$sql_update = "UPDATE loan_clients SET 
	`fname`='$fname', `lname`='$lname', `ciename`='$ciename', `ciephone`='$ciephone'
	WHERE clientsid='$clientsid'";
it gives me an error

Code: Select all

Unknown column 'ciephone' in 'field list'
and i cheked many times it's the exact same field name in my database.

Posted: Wed Aug 25, 2004 4:29 pm
by feyd
it would appear the field is named slightly differently than you think.. maybe this helps:

Code: Select all

<?php

$query = mysql_query('SELECT * FROM loan_clients LIMIT 1') or die(mysql_error());
if(mysql_num_rows($query))
  var_export(mysql_fetch_assoc($query));
else
  die('no results');

?>

Posted: Wed Aug 25, 2004 4:34 pm
by Draco_03
there was a space thx feyd :)