Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
-
Draco_03
- Forum Regular
- Posts: 577
- Joined: Fri Aug 15, 2003 12:25 pm
- Location: Montreal, Canada
Post
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.
-
feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Post
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');
?>
-
Draco_03
- Forum Regular
- Posts: 577
- Joined: Fri Aug 15, 2003 12:25 pm
- Location: Montreal, Canada
Post
by Draco_03 »
there was a space thx feyd
