Jump to content

Making sure they type in a URL


Recommended Posts

Sorry I thought I should have put more info.

I don't need to create a website to go with this. Basically I am creating a database that will run a website for purchasing art. Part of the requirement is to log the url of an artists bio (if they have one!)

The database will be created and stored in my own student database on the uni server.

I have completed just about every other aspect of it and am going through it all once more to try and get a few extra marks.

I currently have it set so www is default but don't think this will really work too well. I also think that they would be told to type in the websites url on the form in the website, but if I can I want to try and limit what is typed in.

Link to comment
Share on other sites

I use SQL Query Analyzer, this is connected to my database so any queries are run and then executed and effect the database. I can check what tables have been created using SQL Server Enteprise Manager. But currently there is nothing to display the data with other than that as this is just a database module and we are not required to do anything other than create the database

Link to comment
Share on other sites

I've already designed and created all of the database, I am now going through it again trying to get a few extra marks here and there. One of the bits I am looking at again is the bio_location field in the Artist table. I want this to only allow web addresses in and not sure what the best way to do this is

Link to comment
Share on other sites

In web development, usually the testing for input is done when the user submits the data, via a website page, using JavaScript, or in your script page, using PHP, ASP, etc.

 

Now I do not use SQL - which MS, but MySql, still I am not sure if their is a generic function in the field that can test for url input only, in both SQL and MySql.

If you are required to have the database to do such a thing, it is a bit illogical, because what happens if it is not an url, do you get an error?

 

You see my point! Anyway maybe you should ask your professor if such a thing is required to do by the database itself, not the input script - you will not have an input script.

 

And if your professor says yes, then look up SQL manual for such a function and, or ask the question again in this thread and see if one of our senior members, skilled in SQL can help you.

 

Link to comment
Share on other sites

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.