Jump to content

karatekid36

Members
  • Posts

    148
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

karatekid36's Achievements

Member

Member (2/5)

0

Reputation

  1. With the below query, it returns the MIN salary for each department, but what if you want to list the EMP_ID or EMP_NAME in this list as well? Meaning you want to see the EMP_ID in the department that has the MIN(salary). Won't that end up expanding the returns to more or less all rows? SELECT department, MIN(salary) as "Lowest salary" FROM employees GROUP BY department; Thanks!
  2. I agree, but something tells me that this issue may not require conditional comments. Something with the margin or the padding in the div's that I am unable to see is causing the problem I think. I am just looking for another set of eyes to help find the issue.
  3. In the rendered browser page, more specifically, the #wood_main div, the three paragraphs sit too high in IE6, but just fine in FF. Can anyone help me out? I had to fix some other problems and when I got to this I think my mind was spent. Any help would be greatly appreciated. If you need any other info, feel free to ask. Thank you. body{ font: 1em Georgia, "Times New Roman", Times, serif; } #topbar { margin: 0px; padding: 0px; background: url(images/top_bar.gif) repeat-x; height: 30px; } #wrapper { margin: 0px auto; width: 860px; overflow: auto; } #wrapper #header { height: 87px; } #home #wrapper #wood_main { } #wrapper #header #left_header { background: url(images/header.gif) no-repeat; height: 87px; width: 620px; float: left; } #home #wrapper #header #nav { } ul#menu{ list-style: none; } ul#menu li { display: inline; } ul#menu li a { text-indent: -9999px; display: block; height: 87px; float: left; } ul#menu li a.home { background: url(images/home.png) no-repeat top center; width: 60px; } ul#menu li a.artist { background: url(images/artist.png) no-repeat top center; width: 43px; } ul#menu li a.work { background: url(images/work.png) no-repeat top center; width: 55px; } ul#menu li a.contact { background: url(images/contact.png) no-repeat top center; width: 72px; } ul#menu li a.home:hover, ul#menu li a.artist:hover, ul#menu li a.work:hover, ul#menu li a.contact:hover { background-position: center center; } body#home ul#menu li a.home { background-position: bottom center; } #home #wrapper #wood_main { background: url(images/wood_main_bg.gif) no-repeat; height: 177px; width: 860px; font-size: 0.875em; color: #FFFFFF; } #home #wrapper #wood_main #wood_left, #home #wrapper #wood_main #wood_middle, #home #wrapper #wood_main #wood_right { width: 256.67px; float: left; padding: 0 0 0 20px; height: 100%; } #home #wrapper #wood_main h2 { font-size: 1.25em; font-weight: bold; letter-spacing: 1px; } #home #wrapper #wood_main p { font-size: .875em; font-weight: lighter; text-align: justify; } #home #wrapper #content { } #home #wrapper #content #main_col { width: 500px; float: left; } #home #wrapper #content .heading1 { font-size: 1.5em; border-bottom: thin solid #999999; font-weight: lighter; margin-top: 5px; margin-bottom: 5px; padding-bottom: 0px; } #home #wrapper #content .heading2 { font-size: 1.125em; border-bottom: thin solid #999999; font-weight: lighter; margin-top: 5px; margin-bottom: 5px; padding-bottom: 0px; } #home #wrapper #content #main_col .main_content { font-size: 0.875em; text-align: justify; line-height: 1.2em; margin-top: 0px; padding-top: 0px; font-weight: lighter; } #home #wrapper #content .oldent { float: left; font-size: .875em; } #home #wrapper #content .newent { float: right; font-size: .875em; } #home #wrapper #content #sec_col { width: 300px; float: right; margin-right: 10px; } #home #wrapper #content #sec_col .sec_content { font-size: .75em; text-align: justify; line-height: 1.2em; margin-top: 5px; padding-top: 0px; } #home #wrapper #content #sec_col img { border: 2px solid #999999; } #home #wrapper #footer { clear: both; background: url(images/tree_footer.gif) no-repeat; height: 94px; width: 860px; padding-top: 20px; } #home #wrapper #footer #left_footer { float: left; } #home #wrapper #footer #right_footer { float: right; } #home #wrapper #footer p { font-size: .75em; padding: 0px; margin: 0px; } #home #wrapper #footer .grey { color: #999999; } #home #wrapper #footer .grey a { text-decoration: none; color: #999999; } #home #wrapper #footer .bottom_text a { text-decoration: underline; color: #000; } #home #wrapper #footer .bottom_text a, #home #wrapper #footer .bottom_text { font-weight: normal; } #bottombar { margin: 0px; padding: 0px; background: url(images/top_bar.gif) repeat-x; height: 30px; }
  4. I understand using the limit, but I want to display 4 for each project. Not just one project. I do not understand which way to do that so that it displays four per project for all the projects that the user is a part of.
  5. Howdy Everyone, In the image below, there is a piece of a front page of a website I am making that I can not figure out how to construct. At the top of the page(not pictured) there is a list of projects that the user is involved with and at the bottom, I would like to display 4 "assets" for each project. A user can be on 1 or 100 projects(there is no limit) but I can not think of a way to do this. I have already built the proper display method to actually display the assets in a form that I can work with, but my trouble is, is displaying 4 assets for each project. What I mean is that I do not know how to write " For each project the user is associated with, build an html table with 4 assets from each project." I have a projects table, a users table, a project assets table, and a user_proj_relation table. I am not asking how I should exactly do this, I am looking for more of an overview of the way this should go, be it mysql or php. I do not know how to achieve my desired result. Can anyone point me in the right direction? Thank you.
  6. I would still very much be interested in a response to this post. If you have any thoughts feel free to add please.
  7. After reading about the IFNULL() function, I am not sure how it applies. All I want to do is list all of the forum titles, with a count of the replies to that post, and then either display the date the topic was posted(if there are no replies) or display the time/date or the latest reply for each forum message.
  8. I have been messing with this query for several hours now and I can not get it to do what I need. Any thoughts as to how I should go about this?
  9. The info about the project and then the users' id into the user_proj_rel table.
  10. Okay I 100% get how this works and see the reasoning behind it, but how can I insert data into two tables at once. I have a form where users fill out the project info, and who is assigned to the project, but I do not want to have two forms where two seperate INSERT queries are made. What is the structure for making two inserts at once?
  11. Okay I understand. In this case, I will be using this for only this one purpose. I read about the union and I am unsure if a Join or a Union will work better based on the last part of my query's needs. Which will make it easier to have either the post date or the last reply date, a union or a join? I would really like to make this in sql only and not php, because I would like to keep the code on the page to a minimum.
  12. Could you elaborate what you mean in the second half of your post?
  13. I have the following table structures My Current Query is as follows. SELECT COUNT(forum_replies.replyid), forum_replies.*, brothers.first_name, brothers.last_name, brothers.user_id, forum_messages.*, DATE_FORMAT(forum_messages.dateentered,'%W %b %D %l:%i%p') AS messagedate, DATE_FORMAT(forum_replies.dateentered,'%W %b %D %l:%i%p') AS replydate FROM forum_messages INNER JOIN brothers ON forum_messages.brotherid = brothers.user_id LEFT JOIN forum_replies ON forum_messages.messageid = forum_replies.inresponseto GROUP BY forum_messages.messageid Now I am getting 90% of my desired output, but this is going to be a the home page of a very basic forum that I am trying to build and what I want to have happen is I want there to be a column where it either displays the last date of a the most recent reply, or if not available, the post date, so that the most recent items stay on the top of the list, and where most of my problems are coming from, I want to sort by this column. Is this at all possible or must I use an IF Else statement? Thanks in advance
  14. Okay I will give this a go and see where it gets me.
  15. I do have a separate user table. These columns are for all the users who are assigned to the project. Is there a better way to place in a table the users who are assigned the project?
×
×
  • 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.