Re: [Zope-dev] general ZMySQL question-wierd results

2001-04-13 Thread Andy Dustman

On Thu, 12 Apr 2001 [EMAIL PROTECTED] 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','[EMAIL PROTECTED]','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



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] general ZMySQL question-wierd results

2001-04-12 Thread sean

I am just trying to learn to use mysql and zope together (relatively new at both) .  
Can 
can create tables, but when I view them I only see the first character of any given 
value.  If the table is named farm, I can see it listed with show tabled from 
my_database at "f".  Likewise, when I select * from my_table, I see the fields listed 
with value of single chars in each one and they appear to be the chars that make up 
the text of my very last field value.
P r o v i d e s (each char is the value of a colum)

I am not sure how to even focus this question more than this, but what is goin on?  
When I create a second table named farm_test and then BROWSE MYSql 
connection object I see two things there... F and F.  Each one has the word table 
under it when expanded.

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','[EMAIL PROTECTED]','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.

 

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )