[Zope-dev] general ZMySQL question-wierd results

Andy Dustman andy@dustman.net
Fri, 13 Apr 2001 18:42:36 -0400 (EDT)


On Thu, 12 Apr 2001 sean@horse101.com wrote:

> Here is how I created the tables:
> CREATE TABLE farm (
>     owner_id int primary key not null auto_increment,
>     farm_name char (40),
>     discipline char (30),
>     owner_fname char(30),
>     owner_lname char(30),
>     farm_address1 char(50),
>     farm_address2 char(50),
>     city char(30),
>     state char(2),
>     zip char(5),
>     country char (20),
>     phone_area_code char(3),
>     phone_no_area char(10),
>     fax char(13),
>     url char(30),
>     email char(15),
>     nearest_city char(15),
>     nearest_city_distance int,
>     add_date date,
>     edit_date date,
>     details char (250))
>
> Here is how I populate the first record:
>
> insert into horse101.farm
> (owner_id,farm_name,discipline,owner_fname,owner_lname,farm_address1,farm_addr
> ess2,city,state,zip,country,phone_area_code,phone_no_area,fax,url,email,nearest_cit
> y,nearest_city_distance,add_date,edit_date,details) values(0,'Riverbed
> Farm','dressage','Vicki','Wall-Kelley','Volkerts
> Rd.','','Sebastopol','CA','95472','USA','707','829-5824','425-123-
> 1234','http://www.dressage.to','webmaster@dressage.to','San Francisco',60,2001-04-
> 10,2001-04-10,'Providing dressage instruction, training, judging as well
> as offering for sale imported and domestic dressage prospects.')
>
> Here is how I attempt to see the records:
> select *
> from farm
>
> Here are my results:
> Owner id= P Farm name=r Discipline=o Owner fname=v ,etc.  You see, the last
> field is being inserted into the other fields one char at a time.
> Any help would be GREATLY appreciated.

Owner id (owner_id) can't be 'P' because it is a numeric column. I suspect
if you use the mysql client program, you will find that the correct values
are in there.

-- 
Andy Dustman         PGP: 0xC72F3F1D
    @       .net     http://dustman.net/andy
"Normally with carbonara you use eggs, but I used lobster brains instead."
    -- Masahiko Kobe (Iron Chef Italian): 30-year-old Giant Lobster Battle