Jump to content

Recommended Posts

Alright someone please tell me if I am doing this totally wrong and possibly some advice. I am making a database of buinesses in various locations of the united states. I have created one table called Businesses, In there I have created 4 fields Zip code, Business, State, City, They are all VARCHAR(255) not null. When I try to add a new row that has the same zip code it give me an error saying it already exists. I know it exists but I could probably have several hundred businesses with the same ZIP. I am assuming i need to change the type of the field to allow duplicate entries. I would like to know how to solve this and if there is a better way of going about this because I will be adding hundreds of businesses in the same ZIP, STATE, CITY all of them will be searchable from a website. Also how would I set-up a field that is capable of having html inserted so that I can query it and display the html as a working page.

Link to comment
https://forums.phpfreaks.com/topic/95017-simple-errorr-duplicate-entry/
Share on other sites

No it was the database when i tried to add a duplicate zip but i figured it out it was because it was set for the primary key thanks for the fast response tho. Do you happen to know how I would add HTML to an entry in a row so that when i query it, it will show up as working HTML in the results.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.