Reply to Re: Learning php Sql

Your name:

Reply:


Posted by Frankly on 06/19/06 19:13

"J.O. Aho" <user@example.net> wrote in message
news:4fo8qhF1jvtpeU1@individual.net...
>> i will need to add 10 feilds.
>
> If you think you never will post it at more places than 10, then okey, but
> you can also create a new table where you save the apartmentid and the
> website where you posted the ad to, this way you can have more places to
> advertise at than ten (I hope I didn't misunderstand you here).

I have never posted to 10 but they are out there.

>
>
>> Website, to save space i think i will just make this a Varchar ( 40)
>> there is no need for this to be a link.
>
> If you have some frequent places where you post, then the site name may be
> enough and 40 would be okey for that (works for short URLs too).


sorry bout that i am still thinking the old way. this database is going to
be a fantastic tool
that i will be working from most of the time. yes I will prep it for the
web site instead of using my favorites list.

>
>
>> Posted to - Varchar (20)i sometimes post the same add to more than 1
>> place or sometimes only 1. this one is confusing to me.
>
> Look at what I wrote a bit higher up in this post, if you choose to use
> the method I suggested, then you can skip this one. You can of course add
> more fields to the table I was thinking about, like date when posted on
> the site.

will do and i will make proper relations to this new table.


>
>
>> Edit link. Varchar (255)
>
> Not sure what this is, so I can't comment this.


usually when i post an ad, I get a reply email with a link to that ad. if i
post 10 ads i get 10 emails back.


>
>
>> Date posted. date 0000-00-00
>
> When you do the INSERT of the apartment to the table, instead of writing
> the current date as '2006-10-20', you can use the SQL function CURDATE()
> which will return the date.
>
> INSERT INTO table(date) VALUES(CURDATE());

I hope by tomorrow I am doing stuff like this.

>
>
>> Fee Disclosure. Varchar (70)will need 4 choices. but can put them in by
>> hand.
>> Posted by - will need choice of 2 of about (30) needs to be Name of agent
>> and name of firm.
>> Subject - Varchar (70) usually includes a brief discription of apartment
>> Comments. Varchar (255) about apartment -
>> MyContactinfo - Varchar (255) 2 choices this usually displays in the
>> same field as comments. i usually include a bit of html.
>> Email-
>>
>> Email, Posted by, MyContactInfo, I think INT can be used. 0 for me and
>> of course my wife can be number 1 :).
>> the realy tricky one for me is how can i disply where i posted to.
>> can i have something like 4 check boxes each box representing a different
>> website?
>
> Yes, you can do that and this can be done in quite many ways, the usual 4
> fields where you store 0 (not posted here) or 1 (posted on the website).
> You can also use one filed and use a binary way of thinking, one website
> is 1, next one is 2, third is 4 and the last is 8, 0 is the same as it's
> not posted at any of the websites, if the value is 5, then the site has
> been posted at website 1 and 3, but not at 2 and 4. This has the drawback
> that you need more PHP code to check up which sites has been posted at.

i take it that you like the binary way better. in doing this i would have
to watch out for values that can have different combos like your not making
the 3rd 3. when someone is helping me i usually go the way they think is
best. I am wondering how much extra code will be needed and if using the
number system will be more confusing for my wife and allow for more errors.
having a feild for each site does seem easier but you have the ability to
see down the road.


i find it odd that the Administrator does not have a print function to print
out my table structure.


>
>> if i had no one to ask i would use enum for the FeeDisclosure. lol i
>> would have also used that for most of the fields :).
>> i guess i could also use INT for fee discloser but i think that is a
>> little tricky.
>> my choices for fee discloser are - the only thing i can think of is enum
>> or INT and have 5 choices.
>> No Broker fee.
>> Low Broker Fee.
>> Broker Fee Negotiable.
>> 15% broker fee. < hardly ever used but sometimes her boss wont except
>> less.
>> 1 Month Broker Fee.
>> all of them include a $40 credit check fee.
>
> Okey, INT(1) could be used here, where each of the options has one value.
> As I have said before, I'm not good at ENUM, so I won't say no or yes, but
> I know the INT(1) would work fine.


you are not good at ENUM? there must be more to it than i know. dispite
the mistake i made in another post. i did do enums in a tutorial. i
thought you didnt like enum perhaps because it was slower than using INT

>
>
>> If i had my own place i would make them all 1 month fee. i think that is
>> very reasonable.
>
> Bosses can make a load of troubles :)
>
> //Aho

i have met this one and wow, I would love to get my wife out of there.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация