Jump to content

samona

Members
  • Posts

    232
  • Joined

  • Last visited

    Never

Everything posted by samona

  1. I have a database Where I will need to join 5 tables in order to get all the information I want. Is that a problem with my relational database, or is it OK?
  2. samona

    Normalization

    Hi, I am wondering how would I include backup computers in the above ER diagram.
  3. samona

    Normalization

    Hi, After reading the tutorials on normalization and many tries of normalizing my database, I would like to ask you guys if it looks like a scalable database.
  4. Hi all, I need some help in checking whether this database is normalized: COMPANY Comany_ID --> Company_Name, Company_ISP, Company_Address, Company_Phone ISP ISP_ID-->ISP_Name, ISP_Address, Monthly_Cost, Year_to_Date_Cost EMPLOYEE Employee_ID -->Name, Address, Type PRODUCT Product_ID -->Product_Description, Employee_ID USER User_ID -->User_Name, Employee_ID, Email_Address, Password COMPUTER Computer_Name--> Computer_ID, IP_Address, Last_Update, OS, Usage Any help will be appreciated.
  5. The following is my code. Do I save it in a session variable like I have below to be able to display it on the other page? if ($user_name && $user_password) { $query = "Select User_ID, First_Name, User_Name, Last_Name, Is_Admin, Last_Login FROM Users WHERE User_Name='$user_name' AND User_Password='$user_password'"; $result = @mysql_query($query); $row = mysql_fetch_array($result, MYSQL_NUM); if($row) { $_Session['last_login'] = $row['Last_Login']; mysql_query("UPDATE table SET Last_Login = 'NOW()' WHERE id = '{$row['user_ID']}"); $result = @mysql_query($query); //Start the session, register the values and redirect. session_name('YourVisitID'); session_set_cookie_params(900, '/','website.com'); session_start(); $_SESSION['first_name'] = $row[1]; $_SESSION['user_id'] = $row[0]; $_SESSION['user_name'] = $row[2]; $_SESSION['last_name'] = $row[3]; $_SESSION['is_admin'] = $row[4]; header("Location: ./loggedin.php"); exit(); }
  6. Hi all, I was hoping someone could help me with recording a user's last login date. I have a form that users use to login. There is an sql statement that checks whether the person is a valid user and allows them to login if a record matches. Is it at this time that I have to make another query to insert the date of the login? Thanks
  7. Hi, I want to redirect users to a different page with a note saying "You are about to be redirected to our new webpage." I have seen this on many websites, but when I try it I get an error saying that output has already been sent to the browser. I would appreciate any help. Thanks!
  8. thank you!
  9. Hi all, I'm trying to put all the equipment I have in a database. I have Printers, Fax Machines, Computers, and Laptops. Do I need a table for each one, or is it more professional if I make a table called Equipment and have one field called TYPE which will state ("printer", "fax", "computer", "laptop")?
  10. Hi, I was wondering what "type" should be used if i want to store a list of notes in a field called "Class_Notes"? Also, Is there a way to store pictures?
  11. samona

    Music

    That's cool. I dunno how you did that. Can you explain it a little more?
  12. samona

    Music

    ok, is there a way to keep someone from saving the file. For exxample if they right click and click save it will say Sorry cant save?
  13. samona

    Music

    Hi, I would like to write a music page in php and stream some of my music pieces that I play on my piano, however, I don't want people to download them. I just want them to listen to it. Is there a way using PHP that I could restrict that? Thanks in advance.
  14. No problem, it was just a thought.
  15. Hi all, I want to write a calendar in PHP and MySQL, but I'm not sure about the tables I will need. How do simulate each month and year in a database. Do I have to have one table for each month. That would be hard to do for say 10 years.
  16. Alright, cuz someone said it didnt work. I was wondering why since it shouldn't make a difference because they are different monitors and shouldnt matter whether one uses vga and the other dvi. I was told i was wrong, so i guess i was not?
  17. We got software covered, but how about hardware? I'm sure there are others besides me who have questions from time to time and need help from other members.
  18. I have a video card that supports DVI and comes with VGA converters. I want to use 2 DVI on two monitors and i want the 3rd monitor to use DVI. Will that work, or do all three have to use either VGA or all three have to use DVI? Thanks in advance.
  19. Will low-profile PCIe card fit in full length PCIe slot?
  20. Would it work with a x8 PIC Express slot?
  21. You will need to use INNER JOIN. For example if I have two tables: User Job ----- -------- UserID JobID UserName JobDescription UserID say I have a user with has a userID of '1' and a username of 'test'. and a JobID of '1' and JobDescription of 'phpDev' and I want to display the name of the person who is the phpDev I would write the following query: Select User.UserName from User INNER JOIN Job ON User.UserID = Job.UserID Where Job.JobDescription = "phpDev"; That would print out Test. I hope that makes sense.
  22. Theres a keyword called Distinct that you can use. FOr example: select distinct destination from train; Will select only one 'destination' even if it exists more than once in the database.
  23. Does it work when you don't use the mysql_real_escape_string() function?
  24. Anyone know of a low-profile video card that supports up to four monitors?
×
×
  • 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.