You are here: Trouble with sql query « PHP Programming Language « IT news, forums, messages
Trouble with sql query

Posted by Fernando Rodrνguez on 01/23/06 21:02

Hi,

I'm sending the follwoing query to mysql from a php script:

----------------------------------------------------------------------------------------
INSERT INTO affiliates (aff_id,
first_name, last_name, main_site_url, monthly_unique_visitors,
email_address, phone_number, address, address2, city, state_or_province,
zip_code, country, payment_threshold, license_to_spam, password, is_active,
signup_date)
VALUES ( `tester` , `Fernando` , `RodrΓ­guez Romero` , `http://www.easyjob.net`
, `100-999` , `yada@easyjob.net` , `+34 91 8130869` , `Arturo Soria, 339
P2 2Izq` , `` , `Madrid` , `Madrid` , `28033` , `Spain` , 100, 1, `1492549`
, 1,2006-01-23)
---------------------------------------------------------------------------------------

And I always get this error:

------------------------------------------
Unknown column 'tester' in 'field list'
------------------------------------------

I don't get it. What am I doing wrong? O:-)

Thanks!

BTW, the table affiliates is as follows:



CREATE TABLE affiliates(
code INT UNSIGNED NOT NULL AUTO_INCREMENT,
id VARCHAR(40) NOT NULL,
first_name VARCHAR(255) NOT NULL,
last_name VARCHAR(255) NOT NULL,
main_site_url VARCHAR(255),
monthly_unique_visitors VARCHAR(25),
company_name VARCHAR(255),
email_address VARCHAR(100) NOT NULL,
phone_number VARCHAR(100) NOT NULL,
address VARCHAR(255) NOT NULL,
address2 VARCHAR(255),
city VARCHAR(255) NOT NULL,
state_or_province VARCHAR(255),
zip_code VARCHAR(25) NOT NULL,
country VARCHAR(100) NOT NULL,
payment_threshold INT UNSIGNED DEFAULT 100 NOT NULL,
commission FLOAT DEFAULT 0.4 NOT NULL,
license_to_spam TINYINT DEFAULT 1 NOT NULL,
is_active TINYINT DEFAULT 1 NOT NULL,
signup_date DATE NOT NULL,
password VARCHAR(40),
comments MEDIUMTEXT,
PRIMARY KEY (code),
UNIQUE UC_id (id),
INDEX IDX_affiliates_1 (id,email_address,is_active,license_to_spam,commission,signup_date),
FULLTEXT IDX_affiliates_2 (comments));

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация