Results 1 to 9 of 9

Thread: User database structure

  1. #1
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default User database structure

    ok, I am going to be creating a little hosting script for users on my site, and i need some advice on how I should make the database.

    should i make the database like this..

    database:
    id =i dont know if i should use id
    username =if username is same alow edit
    url = url to located file
    pp = password protect, yes if true..

    is that a ok database, and should i use a id..

    not to good with mysql so please give some advice, thanks..

    I have a username so if the username is the same, user can edit it, and to show the url to each file...

    EDIT: I think tech_support got mmad cuase the name of the title.. grrrr.. ban me I dont care... your too harsh on titles.. and this doesn't count as post's so why do you care...
    Last edited by Twey; 10-31-2007 at 11:46 AM. Reason: Added a more descriptive title.
    Hey new design new look, goto xudas for personal webdsign help.. (:

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    The reason we require descriptive titles is so that we see what you want, can find the thread later, and others can refer to it. It makes the whole "helping" thing work.
    So, if you'd like to fall outside of that, it's just fine. In fact, I won't even ban you for it. I'll just not help. If you want help, put a title on. Make me care... 'cause right now, you're not really asking nicely.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I am not asking nicely what????

    I'm not being mean at all.. I just said that I think tech got mad cuase of the title...

    you have a atitude problem, jesus. Its allright I leave this forum so you guys can live with your boring lives... This is my last message so yup!

    I like this forum cuase its simple and everything, not to many people and not to many posts all the time, and I am sorry, but I really don't need a forum with a stupid resstriction on titles I got like 5 infractions for two titles..wtf??

    but you all have fun, theirs no reason to reply cuase I am gonna be byby!
    and thanksfor all the help in the past..
    Hey new design new look, goto xudas for personal webdsign help.. (:

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I don't really think he meant 'nicely' in the sense of politely, though in a way, perhaps ultimately so. The main idea is though, if we cannot tell much more from the title of the thread what the thread is about other than 'Help Me!', it makes it hard to decide whether or not to even look at it, and hard to find it later if we did look at it earlier and have a good idea later that might help.

    So, it is a common courtesy, after all. And it helps us to help you.

    Interestingly, though I may have missed it, I cannot find anywhere that it is a rule of the forum, certainly not in the rules section. It is an option for the moderators though, 'non-descriptive title' or something like that, when we select the 'give infraction' option on a post.

    I think it should either be officially added to the rules page, or removed from the infractions menu, to clear up any confusion about it.
    Last edited by jscheuer1; 10-28-2007 at 05:48 PM. Reason: word order
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    yup!
    yup and yup!

    yeh well people don't care(newbies) when they come here they are looking for help not a infraction cuse their newbies, most of the user on here come and leave after they get their anwser, most of all of them dont stay, so are you going to infract? someone who is looking for help, also wouldn't you look at every post with 0 replys, I do that becuase they might not get a anwser back so I atleast try to help them out... becuase no one else said anything... titles are not everything its whats inside that they wrote.

    c'mon rules are getting to be rediculous and getting infracture w/e for a title.. thats just nonsense...
    Hey new design new look, goto xudas for personal webdsign help.. (:

  6. #6
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Quote Originally Posted by insanemonkey View Post
    c'mon rules are getting to be rediculous and getting infracture w/e for a title.. thats just nonsense...
    I disagree. I also run a few forums and a couple sites and rules are very important. If a person wants to be on the site then they can abide by the rules. It's that simple. A forum administrator has only a certain number of things he or she will tolerate. For example I don't allow "chat speak" on my forums, and I don't allow banners and pictures in signatures, etc. If you break my rules you are deleted and banned.

    Quote Originally Posted by insanemonkey View Post
    yeh well people don't care(newbies) when they come here they are looking for help not a infraction cuse their newbies, most of the user on here come and leave after they get their anwser, most of all of them dont stay, so are you going to infract?
    This is the point though is it not? To get help? 90% of the persons on this forum don't have an account and/or don't sign in. How do they get help? The search feature. I can promise that someone coming here for help won't search for "Plz Help me!"

    The forum search feature (not just here but all forums) leave a lot to be desired. and titles to topics help in that feature working correctly.

    A descriptive title and an informative, well spoken topic should be mandatory for every post, regardless.

    SO who is getting infraction-ed? Those that make the forum impossible to search and easily find help.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  7. #7
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default

    K back to the topic man... so If i'm reading your first post right... your looking to make a small type of hosting service... You will probably need a CMS (Content Management System)
    A content management system is a cool thing where the user can edit things and instantly they turn into gold *or happen*... I don't know how todo this yet... but If you could just fill in a little more info on what type of features with the hosting service I might be able to provide some helpful advice...
    If your looking on how to do the username edit stuff I think I have a way...
    Code:
    <?php
    $Username_Input == $_POST['Username'];
    $con = mysql_connect("localhost","#######","########");
    if (!$con)
      {
      die('Could not connect: ' . mysql_error());
      }
    
    mysql_select_db("my_db", $con);
    //Fill in your database name, 
    $result = mysql_query("SELECT * FROM users
    WHERE Username='$Username_Input'");
    //Select FROM Table 
    
    while($row = mysql_fetch_array($result))
      {
      if($row['Username']==$Username_Input){
    echo "This Username has been taken...";
    }else{
    echo "Free to be taken";
      echo "<br />";
      }
    }
    
    ?>
    I haven't tested it... I don't know how to do it as the user types, I bet thats Ajax and Javascript *which I haven't touched because of Accessibility issues...* but that should help...
    If you want to get a login script I just figured out how to do that as well...
    And its actually quite easy...

    -----------------------------
    The fuss...
    Hope this helps man... and keep it cool... djr33 I'm not blaming you, but the way I read it I thought someone hacked into your account... things have changed around here man... Lighten up just a little bit... I too find my self having trouble making good thread titles... I haven't gotten squashed for it yet, but I feel like I am on the edge of it...
    Put a couple of examples of acceptable thread titles if you feel that no one gets it... because sometimes everyone needs an example...
    Last edited by tech_support; 11-01-2007 at 07:43 AM. Reason: removed username and password for security reasons.

  8. #8
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Eh, I stand by what I said.

    Titles can be hard, sure, but it is not difficult to describe SOMEWHAT the contents of the question. "php advice" is not appropriate, in any sense, from a user who has used PHP before. (Maybe a new user who thinks PHP is some foreign concept would think "php advice" is a very specific title describing their problem, and I can understand.) But with any question, it's easy to put something like "using forms to send data or something"... a lot better than "php advice".

    And this is a social environment; if someone falls outside the accepted rules of a social environment, I see no reason we should help them, as they are refusing to participate.

    Also, posting a question and ranting about a rule, while continuing to go against that rule is not the proper way to dispute it. If anyone has a valid complaint and would like to express it, please post in the "feedback" forum. We'll listen, and there's no need to be rude or even forceful-- our point isn't to be mean-- it's to keep the forum flowing smoothly. If something really is a problem, please let us know.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  9. #9
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    should i make the database like this..

    database:
    id =i dont know if i should use id
    ID is only necessary as a unique field by which to reference the row. If you have another unique field (usernames are usually unique, for example) you can use that to reference it rather than an ID field. Otherwise, you need an ID.
    username =if username is same alow edit
    url = url to located file
    pp = password protect, yes if true..
    Rather than recording whether or not it's password protected, you can just store one password field and not save a password (using an empty string or NULL) if the file should not be protected.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •