CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 Assigning a record to two categories

Print topic Send  topic

Author Message
Frank S.
Posted: 10/22/2002, 3:00 PM

Hi all,
I have a db with two tables:
tbltours
tblcategories
They are joined to show how a tour is a member of a particular category. For
example;
Tour ABC is in Category ONE.
Can anyone suggest how I can make Tour ABC be in multiple categories, One
and Two?
Thanks,
Frank

Frank S.
Posted: 10/22/2002, 4:03 PM

Follow-up:
This question is for the "Links" Example.
Thanks again,
Frank

Shawn Mason
Posted: 10/22/2002, 4:11 PM

It's your basic many-to-many design. You need an intersecting table that
contains a minimum of 3 fields. TourCatgID, TourID,CatgID. You will then
use this table for the grid while using lookups to show the user the tour
names and catg names.

--
Kindest Regards,

Shawn Mason,CCD,MCP
I.S. Software Design Associates


"Frank S." <unkief@hotmail.com> wrote in message
news:ap4hpk$dpf$1@news.codecharge.com...
> Hi all,
> I have a db with two tables:
> tbltours
> tblcategories
> They are joined to show how a tour is a member of a particular category.
For
> example;
> Tour ABC is in Category ONE.
> Can anyone suggest how I can make Tour ABC be in multiple categories, One
> and Two?
> Thanks,
> Frank
>
>

Steven Dowd
Posted: 10/22/2002, 4:28 PM

what you are suggesting is same/similar to the std CC examples

category_id
category_name
category_id_parent

when in fact i think Frank is looking for a way to have one record as

category_id , category_name, ( many x) as category_id_parent

all i can think of for this is to save the category_id_parent with custom
code that will allow an Array to be saved in the field

so that you could have data that was

1, boys, 0
2, girls, 0
3, man, 0
4, woman, 0
5, Action Man ,1
6, Barbie Doll, 2
7, Bike All Sizes Uni-Sex, 1|2|3|4

This would be a geat feature if someone knows how to code it as a extra
designtime added function() so it could be used sitewide in common.php

Steven Dowd


"Shawn Mason" <shawn@issda.com> wrote in message
news:ap4lvd$l0u$1@news.codecharge.com...
> It's your basic many-to-many design. You need an intersecting table that
> contains a minimum of 3 fields. TourCatgID, TourID,CatgID. You will then
> use this table for the grid while using lookups to show the user the tour
> names and catg names.
>
> --
> Kindest Regards,
>
> Shawn Mason,CCD,MCP
> I.S. Software Design Associates
>
>
> "Frank S." <unkief@hotmail.com> wrote in message
>news:ap4hpk$dpf$1@news.codecharge.com...
> > Hi all,
> > I have a db with two tables:
> > tbltours
> > tblcategories
> > They are joined to show how a tour is a member of a particular category.
> For
> > example;
> > Tour ABC is in Category ONE.
> > Can anyone suggest how I can make Tour ABC be in multiple categories,
One
> > and Two?
> > Thanks,
> > Frank
> >
> >
>
>

Frank S.
Posted: 10/22/2002, 4:31 PM

Thanks, Steven.
I think you have the idea. I just need to assign a tour to more that one
category. Maybe someone will come up with some code??
Thanks again.
Frank

DonB
Posted: 10/23/2002, 1:37 PM

This is a many-to-many relationship and requires a third ("join") table
"between" the two you already have.
I.e., you want "a tour can have many categories" and "a category can have
many tours".

don


"Frank S." <no_spam_info@auuooh.com> wrote in message
news:ap4n40$n2a$1@news.codecharge.com...
> Thanks, Steven.
> I think you have the idea. I just need to assign a tour to more that one
> category. Maybe someone will come up with some code??
> Thanks again.
> Frank
>
>

Steven Dowd
Posted: 10/23/2002, 2:15 PM

so how would I design that , say using the classifieds example project as a
base

using mysql , i have the normal categories dbtable

and it holds

category_id
category_name
category_id_parent

are you saying i need an extra db table? or an extra field in the existing
table

would it not be easier to just have the category_id_parent able to hold
multiple category_id's
seperated in the data it holds by a comma or |, and use php to parse the
details during the lookup?

I understand what you mean in the many-to-many tour example , but canot
think how to bring what i want into for instance the classifieds example.

Steven



"DonB" <dbweb2@premiersi.com> wrote in message
news:ap71a0$unu$1@news.codecharge.com...
> This is a many-to-many relationship and requires a third ("join") table
> "between" the two you already have.
> I.e., you want "a tour can have many categories" and "a category can have
> many tours".
>
> don
>
>
> "Frank S." <no_spam_info@auuooh.com> wrote in message
>news:ap4n40$n2a$1@news.codecharge.com...
> > Thanks, Steven.
> > I think you have the idea. I just need to assign a tour to more that one
> > category. Maybe someone will come up with some code??
> > Thanks again.
> > Frank
> >
> >
>
>

Shawn Mason
Posted: 10/23/2002, 8:28 PM

This is a multi-part message in MIME format.

------=_NextPart_000_0010_01C27AEC.0FEE9640
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

The 3rd table is a better method then a field that must be parsed for =
it's values. To do it programmatically you would have a grid and update =
page for the 3rd table. Upon an insert you would need to choose the =
TourID and the CatgID. Of course, this would be done from a dropdown =
that would show the user-friendly names. The table would have values =
like (again...using user-friendly values versus the ID's)

Tour Catg
myTour1 bus
myTour1 taxi
myTour2 bus
myTour2 taxi
myTour3 train

The filter would be applied to the catg ID field and the user would see =
all the Tours in that catg. =20

--=20
Kindest Regards,

Shawn Mason,CCD,MCP
I.S. Software Design Associates



"Steven Dowd" <newspost@dowd.co.uk> wrote in message =
news:ap73h6$332$1@news.codecharge.com...
> so how would I design that , say using the classifieds example project =
as a
> base
>=20
> using mysql , i have the normal categories dbtable
>=20
> and it holds
>=20
> category_id
> category_name
> category_id_parent
>=20
> are you saying i need an extra db table? or an extra field in the =
existing
> table
>=20
> would it not be easier to just have the category_id_parent able to =
hold
> multiple category_id's
> seperated in the data it holds by a comma or |, and use php to parse =
the
> details during the lookup?
>=20
> I understand what you mean in the many-to-many tour example , but =
canot
> think how to bring what i want into for instance the classifieds =
example.
>=20
> Steven
>=20
>=20
>=20
> "DonB" <dbweb2@premiersi.com> wrote in message
>news:ap71a0$unu$1@news.codecharge.com...
> > This is a many-to-many relationship and requires a third ("join") =
table
> > "between" the two you already have.
> > I.e., you want "a tour can have many categories" and "a category can =
have
> > many tours".
> >
> > don
> >
> >
> > "Frank S." <no_spam_info@auuooh.com> wrote in message
> >news:ap4n40$n2a$1@news.codecharge.com...
> > > Thanks, Steven.
> > > I think you have the idea. I just need to assign a tour to more =
that one
> > > category. Maybe someone will come up with some code??
> > > Thanks again.
> > > Frank
> > >
> > >
> >
> >
>=20
>=20

------=_NextPart_000_0010_01C27AEC.0FEE9640
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2719.2200" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>The 3rd table is a better method then a =
field that=20
must be parsed for it's values.  To do it programmatically you =
would have a=20
grid and update page for the 3rd table.  Upon an insert you would =
need to=20
choose the TourID and the CatgID.  Of course, this would be done =
from a=20
dropdown that would show the user-friendly names.  The table would =
have=20
values like (again...using user-friendly values versus the =
ID's)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><U>Tour   =20
        Catg</U></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>myTour1    =
bus</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>myTour1   =20
taxi</FONT></DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>myTour2    =
bus</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>myTour2   =20
taxi</FONT></DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>myTour3    =
train</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The filter would be applied to the catg =
ID field=20
and the user would see all the Tours in that catg.  =
</FONT></DIV><FONT=20
face=3DArial size=3D2>
<DIV><BR>-- <BR>Kindest Regards,</DIV>
<DIV> </DIV>
<DIV>Shawn Mason,CCD,MCP<BR>I.S. Software Design Associates</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>"Steven Dowd" <</FONT><A=20
href=3D"mailto:newspost@dowd.co.uk"><FONT face=3DArial=20
size=3D2>newspost@dowd.co.uk</FONT></A><FONT face=3DArial size=3D2>> =
wrote in=20
message </FONT><A href=3D"news:ap73h6$332$1@news.codecharge.com"><FONT =
face=3DArial=20
size=3D2>news:ap73h6$332$1@news.codecharge.com</FONT></A><FONT =
face=3DArial=20
size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>> so how would I =
design that ,=20
say using the classifieds example project as a<BR>> base<BR>> =
<BR>>=20
using mysql , i have the normal categories dbtable<BR>> <BR>> and =
it=20
holds<BR>> <BR>> category_id<BR>> category_name<BR>>=20
category_id_parent<BR>> <BR>> are you saying i need an extra db=20
table?  or an extra field in the existing<BR>> table<BR>> =
<BR>>=20
would it not be easier to just have the category_id_parent able to =
hold<BR>>=20
multiple category_id's<BR>> seperated in the data it holds by a comma =
or=20
|,  and use php to parse the<BR>> details during the =
lookup?<BR>>=20
<BR>> I understand what you mean in the many-to-many tour example , =
but=20
canot<BR>> think how to bring what i want into for instance the =
classifieds=20
example.<BR>> <BR>> Steven<BR>> <BR>> <BR>> <BR>> =
"DonB"=20
<</FONT><A href=3D"mailto:dbweb2@premiersi.com"><FONT face=3DArial=20
size=3D2>dbweb2@premiersi.com</FONT></A><FONT face=3DArial size=3D2>> =
wrote in=20
message<BR>> </FONT><A =
href=3D"news:ap71a0$unu$1@news.codecharge.com"><FONT=20
face=3DArial =
size=3D2>news:ap71a0$unu$1@news.codecharge.com</FONT></A><FONT=20
face=3DArial size=3D2>...<BR>> > This is a many-to-many =
relationship and=20
requires a third ("join") table<BR>> > "between" the two you =
already=20
have.<BR>> > I.e., you want "a tour can have many categories" and =
"a=20
category can have<BR>> > many tours".<BR>> ><BR>> >=20
don<BR>> ><BR>> ><BR>> > "Frank S." <</FONT><A=20
href=3D"mailto:no_spam_info@auuooh.com"><FONT face=3DArial=20
size=3D2>no_spam_info@auuooh.com</FONT></A><FONT face=3DArial =
size=3D2>> wrote in=20
message<BR>> > </FONT><A=20
href=3D"news:ap4n40$n2a$1@news.codecharge.com"><FONT face=3DArial=20
size=3D2>news:ap4n40$n2a$1@news.codecharge.com</FONT></A><FONT =
face=3DArial=20
size=3D2>...<BR>> > > Thanks, Steven.<BR>> > > I think =
you have=20
the idea. I just need to assign a tour to more that one<BR>> > =
>=20
category. Maybe someone will come up with some code??<BR>> > > =
Thanks=20
again.<BR>> > > Frank<BR>> > ><BR>> > =
><BR>>=20
><BR>> ><BR>> <BR>> </FONT></BODY></HTML>

------=_NextPart_000_0010_01C27AEC.0FEE9640--
Steven Dowd
Posted: 10/24/2002, 2:42 AM

This is a multi-part message in MIME format.

------=_NextPart_000_040F_01C27B4A.B2686E60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Shawn, Thanks for the answer,=20
i think i understand what your saying , but canot think how to put=20
it into practice 'within' CodeCharge

i think that you can do what you mean and also keep the normal=20
categories dbtable, with

category_id , category_name, category_id_parent

1 , Bus , 0
2 , Taxi , 0
3 , Car , 0
4 , Train , 0
5 , MyTour1 , 1
6 , MyTour1 , 2
7 , MyTour2 , 1
8 , MyTour2 , 2
9 , MyTour3 , 4

by doing an sql lookup here for the category_name of MyTour1
would give back both entries, as required, this is the basically=20
the standard system that CodeCharge uses, but its doing its=20
lookups on the category_name ref from category_id, so its only
gives as std 1 entry back. and on adding data from admin, same=20
is true its based on a single addition of the name etc, per admin=20
page because when adding data through the grid edit system,=20
the system only allows for a single 'category_id_parent' to be chosen

so just to enter what i show above would meen that the MyTour1/2
entries would have to have been entered twice.

how would I get to Add 'once', but choose multiple category_id_parents
during that single data enrty admin page?

This is what i cannot figure

Steven


"Shawn Mason" <shawn@issda.com> wrote in message =
news:ap7pdi$9m6$1@news.codecharge.com...
The 3rd table is a better method then a field that must be parsed for =
it's values. To do it programmatically you would have a grid and update =
page for the 3rd table. Upon an insert you would need to choose the =
TourID and the CatgID. Of course, this would be done from a dropdown =
that would show the user-friendly names. The table would have values =
like (again...using user-friendly values versus the ID's)

Tour Catg
myTour1 bus
myTour1 taxi
myTour2 bus
myTour2 taxi
myTour3 train

The filter would be applied to the catg ID field and the user would =
see all the Tours in that catg. =20

--=20
Kindest Regards,

Shawn Mason,CCD,MCP
I.S. Software Design Associates



"Steven Dowd" <newspost@dowd.co.uk> wrote in message =
news:ap73h6$332$1@news.codecharge.com...
> so how would I design that , say using the classifieds example =
project as a
> base
>=20
> using mysql , i have the normal categories dbtable
>=20
> and it holds
>=20
> category_id
> category_name
> category_id_parent
>=20
> are you saying i need an extra db table? or an extra field in the =
existing
> table
>=20
> would it not be easier to just have the category_id_parent able to =
hold
> multiple category_id's
> seperated in the data it holds by a comma or |, and use php to =
parse the
> details during the lookup?
>=20
> I understand what you mean in the many-to-many tour example , but =
canot
> think how to bring what i want into for instance the classifieds =
example.
>=20
> Steven
>=20
>=20
>=20
> "DonB" <dbweb2@premiersi.com> wrote in message
>news:ap71a0$unu$1@news.codecharge.com...
> > This is a many-to-many relationship and requires a third ("join") =
table
> > "between" the two you already have.
> > I.e., you want "a tour can have many categories" and "a category =
can have
> > many tours".
> >
> > don
> >
> >
> > "Frank S." <no_spam_info@auuooh.com> wrote in message
> >news:ap4n40$n2a$1@news.codecharge.com...
> > > Thanks, Steven.
> > > I think you have the idea. I just need to assign a tour to more =
that one
> > > category. Maybe someone will come up with some code??
> > > Thanks again.
> > > Frank
> > >
> > >
> >
> >
>=20
>
------=_NextPart_000_040F_01C27B4A.B2686E60
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Shawn, Thanks for the answer, =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>i think i understand what your saying , =
but canot=20
think how to put </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>it into practice 'within' =
CodeCharge</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>i think that you can do what you mean =
and=20
also  keep the normal </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>categories dbtable, with</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>category_id , category_name,=20
category_id_parent</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>1      =20
         ,   =
Bus   =20
           , =
   =20
0</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>2          &nb=
sp;     ,  =20
Taxi=20
            &=
nbsp; ,=20
    0</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>3          &nb=
sp;     ,  =20
Car =20
            &=
nbsp; ,=20
    0</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>4          &nb=
sp;     ,  =20
Train           &n=
bsp;  ,=20
    0</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>5          &nb=
sp;     ,  =20
MyTour1        , =
   =20
1</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>6          &nb=
sp;     ,  =20
MyTour1        ,   =
; =20
2</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>7          &nb=
sp;     ,  =20
MyTour2        ,   =
; =20
1</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>8          &nb=
sp;     ,  =20
MyTour2        , =
   =20
2</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>9          &nb=
sp;     ,  =20
MyTour3        ,   =
; =20
4</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>by doing an sql lookup here for the =
category_name=20
of MyTour1</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>would give back both entries, as =
required, this is=20
the basically </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>the standard </FONT><FONT face=3DArial =
size=3D2>system=20
that CodeCharge uses, but its doing its </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>lookups on the category_name ref from =
category_id,=20
so its only</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>gives as std 1 entry back. and on =
adding data from=20
admin, same </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>is true its based on a single addition =
of the name=20
etc, per admin </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>page because</FONT><FONT face=3DArial =
size=3D2> when=20
adding data through the grid edit system, </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>the system only </FONT><FONT =
face=3DArial=20
size=3D2>allows for a single 'category_id_parent' to be =
chosen</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>so just to enter what i show above =
would meen that=20
the MyTour1/2</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>entries would have to have been entered =

twice.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>how would I get to Add 'once', but =
choose multiple=20
category_id_parents</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>during that single data enrty admin=20
page?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>This is what i cannot =
figure</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Steven</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Shawn Mason" <<A=20
href=3D"mailto:shawn@issda.com">shawn@issda.com</A>> wrote in =
message <A=20
=
href=3D"news:ap7pdi$9m6$1@news.codecharge.com">news:ap7pdi$9m6$1@news.cod=
echarge.com</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>The 3rd table is a better method then =
a field=20
that must be parsed for it's values.  To do it programmatically =
you would=20
have a grid and update page for the 3rd table.  Upon an insert =
you would=20
need to choose the TourID and the CatgID.  Of course, this would =
be done=20
from a dropdown that would show the user-friendly names.  The =
table would=20
have values like (again...using user-friendly values versus the=20
ID's)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><U>Tour   =20
        Catg</U></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>myTour1    =
bus</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>myTour1   =20
taxi</FONT></DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>myTour2    =
bus</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>myTour2   =20
taxi</FONT></DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>myTour3    =
train</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The filter would be applied to the =
catg ID field=20
and the user would see all the Tours in that catg.  =
</FONT></DIV><FONT=20
face=3DArial size=3D2>
<DIV><BR>-- <BR>Kindest Regards,</DIV>
<DIV> </DIV>
<DIV>Shawn Mason,CCD,MCP<BR>I.S. Software Design =
Associates</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>"Steven Dowd" <</FONT><A=20
href=3D"mailto:newspost@dowd.co.uk"><FONT face=3DArial=20
size=3D2>newspost@dowd.co.uk</FONT></A><FONT face=3DArial =
size=3D2>> wrote in=20
message </FONT><A href=3D"news:ap73h6$332$1@news.codecharge.com"><FONT =

face=3DArial =
size=3D2>news:ap73h6$332$1@news.codecharge.com</FONT></A><FONT=20
face=3DArial size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>> =
so how would I=20
design that , say using the classifieds example project as a<BR>>=20
base<BR>> <BR>> using mysql , i have the normal categories=20
dbtable<BR>> <BR>> and it holds<BR>> <BR>> =
category_id<BR>>=20
category_name<BR>> category_id_parent<BR>> <BR>> are you =
saying i=20
need an extra db table?  or an extra field in the =
existing<BR>>=20
table<BR>> <BR>> would it not be easier to just have the=20
category_id_parent able to hold<BR>> multiple category_id's<BR>> =

seperated in the data it holds by a comma or |,  and use php to =
parse=20
the<BR>> details during the lookup?<BR>> <BR>> I understand =
what you=20
mean in the many-to-many tour example , but canot<BR>> think how to =
bring=20
what i want into for instance the classifieds example.<BR>> =
<BR>>=20
Steven<BR>> <BR>> <BR>> <BR>> "DonB" <</FONT><A=20
href=3D"mailto:dbweb2@premiersi.com"><FONT face=3DArial=20
size=3D2>dbweb2@premiersi.com</FONT></A><FONT face=3DArial =
size=3D2>> wrote in=20
message<BR>> </FONT><A =
href=3D"news:ap71a0$unu$1@news.codecharge.com"><FONT=20
face=3DArial =
size=3D2>news:ap71a0$unu$1@news.codecharge.com</FONT></A><FONT=20
face=3DArial size=3D2>...<BR>> > This is a many-to-many =
relationship and=20
requires a third ("join") table<BR>> > "between" the two you =
already=20
have.<BR>> > I.e., you want "a tour can have many categories" =
and "a=20
category can have<BR>> > many tours".<BR>> ><BR>> >=20
don<BR>> ><BR>> ><BR>> > "Frank S." <</FONT><A=20
href=3D"mailto:no_spam_info@auuooh.com"><FONT face=3DArial=20
size=3D2>no_spam_info@auuooh.com</FONT></A><FONT face=3DArial =
size=3D2>> wrote in=20
message<BR>> > </FONT><A=20
href=3D"news:ap4n40$n2a$1@news.codecharge.com"><FONT face=3DArial=20
size=3D2>news:ap4n40$n2a$1@news.codecharge.com</FONT></A><FONT =
face=3DArial=20
size=3D2>...<BR>> > > Thanks, Steven.<BR>> > > I =
think you=20
have the idea. I just need to assign a tour to more that one<BR>> =
> >=20
category. Maybe someone will come up with some code??<BR>> > =
> Thanks=20
again.<BR>> > > Frank<BR>> > ><BR>> > =
><BR>>=20
><BR>> ><BR>> <BR>> </FONT></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_040F_01C27B4A.B2686E60--

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.