Jump to content

Recommended Posts

Ok, this is a weird one.  I'm using:

 

- RH AS 4

- mysql 4.1.22

- php 4.3.9

insert into applicants(appdate, appid,firstname,middlename,familyname,legalname,dob,gender,uscitizen,uilaw,uihawkid,uidnumber,lawschool,email,cellphone,homephone,curraddr1,curraddr2,curraddr3,currcity,currstate,currpostalcode,currcountry,permaddr1,permaddr2,permaddr3,permcity,permstate,permpostalcode,permcountry,contactname,contactrelationship,contactaddr1,contactaddr2,contactaddr3,contactcity,contactstate,contactpostalcode,contactcountry,contactphone,contactemail,whichapp) values (now(), '7FE00481-4EF3-1552-BB34-92D0D56CE785','B','l','r','adsf','2011-07-05','male','','yes','rramsey','456123','','a@b.com','312 456 7890','','1','2','3','r','ia','45612','USA','','','','','','','USA','d','w','1','23','3','','','','USA','','','l')

- mysql_error() is Unknown column 'whichapp' in 'field list' 

- mysql_errno() is 1054

- create table is

CREATE TABLE `applicants` (
  `appdate` datetime NOT NULL default '0000-00-00 00:00:00',
  `appid` varchar(255) NOT NULL default '',
  `familyname` varchar(255) NOT NULL default '',
  `firstname` varchar(255) NOT NULL default '',
  `middlename` varchar(255) NOT NULL default '',
  `legalname` varchar(255) NOT NULL default '',
  `dob` date NOT NULL default '0000-00-00',
  `curraddr1` varchar(100) NOT NULL default '',
  `curraddr2` varchar(100) NOT NULL default '',
  `curraddr3` varchar(100) NOT NULL default '',
  `currstate` varchar(100) NOT NULL default '',
  `currcity` varchar(100) NOT NULL default '',
  `currcountry` varchar(100) NOT NULL default '',
  `currpostalcode` varchar(100) NOT NULL default '',
  `cellphone` varchar(100) NOT NULL default '',
  `homephone` varchar(100) NOT NULL default '',
  `uistudent` enum('y','n') NOT NULL default 'y',
  `uihawkid` varchar(100) NOT NULL default '',
  `email` varchar(100) NOT NULL default '',
  `permaddr1` varchar(100) NOT NULL default '',
  `permaddr2` varchar(100) NOT NULL default '',
  `permaddr3` varchar(100) NOT NULL default '',
  `permstate` varchar(100) NOT NULL default '',
  `permcity` varchar(100) NOT NULL default '',
  `permcountry` varchar(100) NOT NULL default '',
  `permpostalcode` varchar(100) NOT NULL default '',
  `contactname` varchar(100) NOT NULL default '',
  `contactaddr1` varchar(100) NOT NULL default '',
  `contactaddr2` varchar(100) NOT NULL default '',
  `contactaddr3` varchar(100) NOT NULL default '',
  `contactstate` varchar(100) NOT NULL default '',
  `contactcity` varchar(100) NOT NULL default '',
  `contactcountry` varchar(100) NOT NULL default '',
  `contactpostalcode` varchar(100) NOT NULL default '',
  `contactphone` varchar(100) NOT NULL default '',
  `contactemail` varchar(100) NOT NULL default '',
  `contactrelationship` varchar(100) NOT NULL default '',
  `uilaw` enum('y','n') NOT NULL default 'y',
  `lawschool` varchar(100) NOT NULL default '',
  `uidnumber` varchar(100) NOT NULL default '',
  `lawyear` varchar(100) NOT NULL default '',
  `gender` varchar(100) NOT NULL default '',
  `whichapp` varchar(100) NOT NULL default '',
  `uscitizen` enum('y','n','blank') NOT NULL default 'blank',
  PRIMARY KEY  (`appid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1

 

I'm trying to just insert the data.  If I copy and paste the insert query into either Mysql Control Center or the mysql command line, it inserts with no problem.  The other puzzling thing is that if I simply do a

select * from applicants

in mysqlcc then I get:

[www.law.uiowa.edu] ERROR 1104: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay

But if I do the same select query from the command line, it works just fine. 

 

Here's the result of explain select * from applicants:

+----+-------------+------------+--------+---------------+--------+---------+--------+--------+-------+

| id | select_type | table      | type  | possible_keys | key    | key_len | ref    | rows  | Extra |

+----+-------------+------------+--------+---------------+--------+---------+--------+--------+-------+

|  1 | SIMPLE      | applicants | ALL    | [NULL]        | [NULL] |  [NULL] | [NULL] |      3 |      |

+----+-------------+------------+--------+---------------+--------+---------+--------+--------+-------+

 

Whew.  I think I've got all of the info in the posting instructions. :)

 

So I'm just extremely puzzled by this one.

 

Yes, I know mysql and php 4 are old, but they are what RedHat AS 4 supports.  We're moving to RH 6 server in a few months, but I still need this to work now.

Any ideas?

 

Thanks,

 

Bob

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.