Go Back   Dynamic Drive Forums > General Coding > MySQL and other databases
Search Dynamic Drive Forums:

Reply
 
Thread Tools Search this Thread
  #1  
Old 10-28-2007, 05:10 AM
insanemonkey insanemonkey is offline
Regular Coders
 
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...
__________________
Hey new design new look, goto xudas for personal webdsign help.. (:

Last edited by Twey; 10-31-2007 at 12:46 PM. Reason: Added a more descriptive title.
Reply With Quote
  #2  
Old 10-28-2007, 10:55 AM
djr33's Avatar
djr33 djr33 is offline
Global Moderator
 
Join Date: Mar 2006
Location: N. California, USA
Posts: 6,408
Thanks: 11
Thanked 82 Times in 82 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 - <?php?> | <html>| Ich lerne Deutsch. | Studio l'italiano. | Estudiaba español. | Estudo português. | 日本語の勉強。| मैं हिन्दी सीखो | درس العربية
Reply With Quote
  #3  
Old 10-28-2007, 05:06 PM
insanemonkey insanemonkey is offline
Regular Coders
 
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.. (:
Reply With Quote
  #4  
Old 10-28-2007, 06:11 PM
jscheuer1's Avatar
jscheuer1 jscheuer1 is offline
No Kidding?
 
Join Date: Mar 2005
Location: SE PA USA
Posts: 19,000
Thanks: 19
Thanked 1,135 Times in 1,121 Posts
Blog Entries: 3
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.
__________________
WWWWWWWWWWWW
- John
________________________

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

Last edited by jscheuer1; 10-28-2007 at 06:48 PM. Reason: word order
Reply With Quote
  #5  
Old 10-28-2007, 06:21 PM
insanemonkey insanemonkey is offline
Regular Coders
 
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.. (:
Reply With Quote
  #6  
Old 10-28-2007, 06:43 PM
BLiZZaRD's Avatar
BLiZZaRD BLiZZaRD is offline
Elite Coders
 
Join Date: Aug 2005
Location: Other Side of My Monitor
Posts: 3,158
Thanks: 1
Thanked 62 Times in 62 Posts
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.
Reply With Quote
  #7  
Old 10-31-2007, 02:23 AM
Rockonmetal Rockonmetal is offline
Senior Coders
 
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 08:43 AM. Reason: removed username and password for security reasons.
Reply With Quote
  #8  
Old 10-31-2007, 12:04 PM
djr33's Avatar
djr33 djr33 is offline
Global Moderator
 
Join Date: Mar 2006
Location: N. California, USA
Posts: 6,408
Thanks: 11
Thanked 82 Times in 82 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 - <?php?> | <html>| Ich lerne Deutsch. | Studio l'italiano. | Estudiaba español. | Estudo português. | 日本語の勉強。| मैं हिन्दी सीखो | درس العربية
Reply With Quote
  #9  
Old 10-31-2007, 01:02 PM
Twey's Avatar
Twey Twey is offline
Modtoreador
 
Join Date: Jun 2005
Location: 英国
Posts: 11,933
Thanks: 1
Thanked 180 Times in 172 Posts
Blog Entries: 2
Default

Quote:
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.
Quote:
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!
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:17 AM.

Home - Contact Us - Archives - Link to DD - Top 

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.