MySQL ENCODE() question

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
tylerg
Forum Newbie
Posts: 3
Joined: Wed Jul 14, 2004 3:42 pm

MySQL ENCODE() question

Post by tylerg »

I'm getting an error in my SQL syntax, can't figure out where it is... can anyone spot it?


insert into `Client` (`Client_id`,`fname`,`lname`,`email`,`name`,`password`)
values('598','tyler','ganske','tyler.ganske@gems2.gov.bc.ca`,encode(administrator1,'tyler1'))

and I tried

insert into `Client` (`Client_id`,`fname`,`lname`,`email`,`name`,`password`)
values('598','tyler','ganske','tyler.ganske@gems2.gov.bc.ca`,encode('administrator1','tyler1'))

and

insert into `Client` (`Client_id`,`fname`,`lname`,`email`,`name`,`password`)
values('598','tyler','ganske','tyler.ganske@gems2.gov.bc.ca`,encode('tyler1','administrator1'))

and

insert into `Client` (`Client_id`,`fname`,`lname`,`email`,`name`,`password`)
values('598','tyler','ganske','tyler.ganske@gems2.gov.bc.ca`,encode('tyler1',administrator1))


???


edited by : infolock
Moved to databases
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you have 5 values passed, but you are saying you are inserting 6..
tylerg
Forum Newbie
Posts: 3
Joined: Wed Jul 14, 2004 3:42 pm

cheers -

Post by tylerg »

you were right! and I realized that I also had 2 mySQL quotes closing values, rather than regular single '

thnx
Post Reply