PDA

View Full Version : User database structure



insanemonkey
10-28-2007, 04:10 AM
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...

djr33
10-28-2007, 09:55 AM
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.

insanemonkey
10-28-2007, 04:06 PM
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..

jscheuer1
10-28-2007, 05:11 PM
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.

insanemonkey
10-28-2007, 05:21 PM
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...

BLiZZaRD
10-28-2007, 05:43 PM
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.



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.

Rockonmetal
10-31-2007, 01:23 AM
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...


<?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...

djr33
10-31-2007, 11:04 AM
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.

Twey
10-31-2007, 12:02 PM
should i make the database like this..

database:
id =i dont know if i should use idID 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.