View Single Post
Old 12-07-2007, 03:30 PM   #37 (permalink)
SOCK
The Acquainted
 
Join Date: Nov 2007
Posts: 154
Thanks: 31
SOCK is on a distinguished road
Default

Quote:
Originally Posted by YBH View Post
MySQL 5.0.41

Actually Sock, I think I found the problem. You might actually be laughing soon....

PHP Code:
$db = new mysqli ('localhost''user''pass''dir''address''phone''email'); 
I think thats the problem. Shouldn't that be 'localhost', 'ybh305_clients', 'my_password', 'clients'

localhost->db name->db password->which table ?
Err, I posted that two days ago. Scroll up.

Quote:
PHP Code:
//Insert info
$sql "INSERT INTO clients(user, pass, dir, address, phone, email)";
$sql .= "values('$user$pass$dir$address$phone$email')"
I'm getting a MySQL error when I run it

PHP Code:
Column count doesn't match value count at row 1 
I'm not sure what that means. My rows are as follows in my table:

user
pass
dir
address
phone
email
Look at your SQL statement:
PHP Code:
$sql .= "values('$user$pass$dir$address$phone$email')"
See anything wrong with that?
SOCK is offline  
Reply With Quote