I want to pull a list or URL's from a database. They must go one by one, so should i make the table have one field called 'link', then whenever I call the top value, it performs the action, then deletes it, moving on to next url?

Should i also have an id field?

Recommended Answers

All 4 Replies

Having a field (counter/id) is always good. It can be used as an index, to make the table more efficient. But why do you want a table with the links ? You can use an array of links and whenever the user has visited that link, unset that array element.

No, the list of links is going to be passed to a script. So would i make the id field a PRIMARY KEY or INDEX?

You can make the array of links a session variable if you want it to persist across the scripts.

Primary key. Because primary key can serve as an index(but not vice versa!)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.