Re: Help with previous database.
Posted by: Robert Threadgill
Date: May 21, 2012 11:15AM

James,

Let me start from the top, now that i have worked with it some more I have more questions.

Here are the tables or fields ? not sure what is what yet from my database.

1st on the list would be the fields I don't care about or will not be on my import will have () around them. When I do a import I don't what these to have any affect on anything. Like field count. They can stay I'm just not using them for anything that relaies to the import.

ID
TITLE
DESCRIPTION
URL
(ADDRESS)
(CITY)
(STATE)
(COUNTRY)
(ZIP)
(PHONE_NUMBER)
(FAX_NUMBER)
CATEGORY_ID
(RECPR_URL)
(RECPR_REQUIRED)
STATUS
VALID
(RATING)
(VOTES)
(COMMENT_COUNT)
(RECPR_VALID)
(OWNER_ID)
(OWNER_NAME)
(OWNER_EMAIL)
(OWNER_NEWSLETTER_ALLOW)
(OWNER_NOTIF)
(OWNER_EMAIL_CONFIRMED)
(DATE_MODIFIED)
DATE_ADDED
(HITS)
(LAST_CHECKED)
(RECPR_LAST_CHECKED)
(PAGERANK)
(INLINKS)
(ALEXARANK)
(COMPETERANK)
(RECPR_PAGERANK)
FEATURED_MAIN
FEATURED
EXPIRY_DATE
(NOFOLLOW)
(PAYED)
LINK_TYPE
(IPADDRESS)
(DOMAIN)
(OTHER_INFO)
META_KEYWORDS
META_DESCRIPTION
(RECPR_EXPIRED)
PRICE
IMAGE
FILE
STORE_ID
EXPIRATION_DATE
COUPON_CODE
AFFURL
PROMOTION_TYPE
MANUFACTURER
MANUFACTURER_ID

Starting from the top with "ID" this was "INT(11) "AUTO INCREMENT" I changed it to what you see.

ID varchar(20) utf8_unicode_ci No None
TITLE varchar(255) utf8_unicode_ci No None
DESCRIPTION longtext utf8_unicode_ci Yes NULL
URL varchar(255) utf8_unicode_ci No None
ADDRESS varchar(255) utf8_unicode_ci Yes NULL
CITY varchar(255) utf8_unicode_ci Yes NULL
STATE varchar(255) utf8_unicode_ci Yes NULL
COUNTRY varchar(255) utf8_unicode_ci Yes NULL
ZIP varchar(255) utf8_unicode_ci Yes NULL
PHONE_NUMBER varchar(255) utf8_unicode_ci Yes NULL
FAX_NUMBER varchar(255) utf8_unicode_ci Yes NULL
CATEGORY_ID varchar(255) utf8_unicode_ci Yes NULL
RECPR_URL varchar(255) utf8_unicode_ci Yes NULL
RECPR_REQUIRED tinyint(4) No 0
STATUS int(11) No 0
VALID tinyint(4) No 0
RATING varchar(11) utf8_unicode_ci No None
VOTES varchar(11) utf8_unicode_ci No None
COMMENT_COUNT varchar(11) utf8_unicode_ci No None
RECPR_VALID tinyint(4) No 0
OWNER_ID int(11) Yes NULL
OWNER_NAME varchar(255) utf8_unicode_ci Yes NULL
OWNER_EMAIL varchar(255) utf8_unicode_ci Yes NULL
OWNER_NEWSLETTER_ALLOW int(11) No 1
OWNER_NOTIF int(11) No 0
OWNER_EMAIL_CONFIRMED int(11) No 1
DATE_MODIFIED timestamp on update CURRENT_TIMESTAMP No CURRENT_TIMESTAMP
DATE_ADDED date No 0000-00-00
HITS int(11) No 0
LAST_CHECKED datetime Yes NULL
RECPR_LAST_CHECKED datetime Yes NULL
PAGERANK int(11) No -1
INLINKS bigint(20) No -1
ALEXARANK bigint(20) No -1
COMPETERANK bigint(20) No -1
RECPR_PAGERANK int(11) No -1
FEATURED_MAIN int(11) No 0
FEATURED int(11) No 0
EXPIRY_DATE datetime Yes NULL
NOFOLLOW tinyint(4) No 0
PAYED int(11) No -1
LINK_TYPE varchar(255) utf8_unicode_ci Yes NULL
IPADDRESS varchar(15) utf8_unicode_ci Yes NULL
DOMAIN varchar(250) utf8_unicode_ci Yes NULL
OTHER_INFO text utf8_unicode_ci Yes NULL
META_KEYWORDS text utf8_unicode_ci Yes NULL
META_DESCRIPTION text utf8_unicode_ci Yes NULL
RECPR_EXPIRED tinyint(4) No 0
PRICE varchar(255) utf8_unicode_ci Yes NULL
IMAGE varchar(255) utf8_unicode_ci Yes NULL
FILE varchar(255) utf8_unicode_ci Yes NULL
STORE_ID varchar(255) utf8_unicode_ci Yes NULL
EXPIRATION_DATE date Yes NULL
COUPON_CODE varchar(255) utf8_unicode_ci Yes NULL
AFFURL varchar(255) utf8_unicode_ci Yes NULL
PROMOTION_TYPE varchar(255) utf8_unicode_ci Yes NULL
MANUFACTURER varchar(255) utf8_unicode_ci Yes NULL
MANUFACTURER_ID varchar(255) utf8_unicode_ci Yes NULL

Here are the fields I will be importing.

PROGRAMNAME _________ CATEGORY_ID
PROGRAMURL _________ URL
NAME _________ TITLE
KEYWORDS _________ META_KEYWORDS
DESCRIPTION _________ DESCRIPTION
MANUFACTURER ________ MANUFACTURER
MANUFACTURERID ______ MANUFACTURER_ID
BUYURL __________ AFFURL
IMAGEURL __________ IMAGE
ADVERTISERCATEGORY __ CATEGORY_ID "you will see this is also on programname I have to "CONCATENATE" in Excel"

The main thing I need to do is make sure they are all names and not numbers, so when I import them they will know where to go or if we need to keep it the way it is then when I import will it know how to convert the name to a number ie. "24 Hour Fitness" is number "667" in the database.

When I import it puts everything in the "TOP" category "I think" because it is looking for a number instead of the name.

I wondering why we even need the "ID" field and not just use the "TITLE" field, the more I'm typing I thinking this is not a MYSQL issue more then it is a PHP or AJAX programmer issue what can't the import script just look for "TITLE" instead of "ID".

I guess if all the field are correct with what is above as far as type or the "YES" & "NO" and the "NULL".

If you need I can show you the script and you can tell me if it is looking for the propper fields or not.

Options: ReplyQuote


Subject
Written By
Posted
Re: Help with previous database.
May 21, 2012 11:15AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.