DangerM0use Posted May 8, 2007 Share Posted May 8, 2007 Hi, not sure if this is in the right forum, so sorry if it is! I am doing an assignment where I have to create an SQL database. I am just wondering what the constraint is to make sure they type in a web address. Cheers Quote Link to comment https://forums.phpfreaks.com/topic/50491-making-sure-they-type-in-a-url/ Share on other sites More sharing options...
igor berger Posted May 8, 2007 Share Posted May 8, 2007 Do you know how to use HTML? Do you know how to use PHP or ASP? Are you talking about SQL or MySql? Do you have a webserver or are you going to use your computer to do this? Quote Link to comment https://forums.phpfreaks.com/topic/50491-making-sure-they-type-in-a-url/#findComment-248051 Share on other sites More sharing options...
DangerM0use Posted May 8, 2007 Author Share Posted May 8, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/50491-making-sure-they-type-in-a-url/#findComment-248054 Share on other sites More sharing options...
igor berger Posted May 8, 2007 Share Posted May 8, 2007 Are you using SQL or MySql? Can you post a url from your university Website were you will have the students feel out the form? Quote Link to comment https://forums.phpfreaks.com/topic/50491-making-sure-they-type-in-a-url/#findComment-248076 Share on other sites More sharing options...
DangerM0use Posted May 8, 2007 Author Share Posted May 8, 2007 SQL and no there is no actual form. The database has to be created for an imaginary website that isn't actually there Quote Link to comment https://forums.phpfreaks.com/topic/50491-making-sure-they-type-in-a-url/#findComment-248091 Share on other sites More sharing options...
igor berger Posted May 8, 2007 Share Posted May 8, 2007 Okay, so how are you going to input the data to the database? How are you going to display the data, after retriving it from the database? Do you have some sort of administration module, that lets your run commands on the database? Quote Link to comment https://forums.phpfreaks.com/topic/50491-making-sure-they-type-in-a-url/#findComment-248100 Share on other sites More sharing options...
DangerM0use Posted May 8, 2007 Author Share Posted May 8, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/50491-making-sure-they-type-in-a-url/#findComment-248107 Share on other sites More sharing options...
igor berger Posted May 8, 2007 Share Posted May 8, 2007 Okay, so now you have to create your structure. The table the fileds and the type of fileds, and index, do one id field and set an index on it. So before you hard code it, make a flow chart of what you want to do. Quote Link to comment https://forums.phpfreaks.com/topic/50491-making-sure-they-type-in-a-url/#findComment-248150 Share on other sites More sharing options...
DangerM0use Posted May 8, 2007 Author Share Posted May 8, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/50491-making-sure-they-type-in-a-url/#findComment-248166 Share on other sites More sharing options...
igor berger Posted May 8, 2007 Share Posted May 8, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/50491-making-sure-they-type-in-a-url/#findComment-248188 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.