[ic] 001234 eq 1234 in [data] tag

Gert van der Spoel gert at 3edge.com
Mon May 14 12:01:51 UTC 2012


> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org [mailto:interchange-users-
> bounces at icdevgroup.org] On Behalf Of Grant
> Sent: maandag 14 mei 2012 14:55
> To: interchange-users at icdevgroup.org
> Subject: Re: [ic] 001234 eq 1234 in [data] tag
> 
> >>> I just noticed that this returns the title of SKU 1234:
> >>>
> >>> [data table=products key=|001234| field=title]
> >>>
> >>> Is this inherited from mysql or is it IC behavior?
> >>>
> >>> - Grant
> >>
> >>
> >> This is especially problematic because the following produces nothing,
> >> which is inconsistent with the above:
> >>
> >> [loop
> >> search="fi=products/ml=1/st=db/sf=sku/se=001234/op=eq/nu=0"][loop-data
> >> products title][/loop]
> >>
> >> - Grant
> >
> >
> > Which type is your sku column in products? varchar or int?
> >
> > Regards
> >        Racke
> 
> I have this:
> 
> Database products COLUMN_DEF "sku=INT(6) AUTO_INCREMENT PRIMARY KEY"
> 
> Am I seeing this behavior because of INT?  Is VARCHAR ok to use with
> AUTO_INCREMENT?
> 
> - Grant
> 

But you have a key that actually has '001234'  in that row?  I do not see
how mysql would have prefixed zeros ... And 001234 and 01234 and 1234 would
be the same and saving any more than one of those would result in a unique
key constraint.

CU,

Gert






More information about the interchange-users mailing list