Jump to content

rburch

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rburch's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. You can have a subquery on the end of ORDER BY, only on WHERE x = Your ORDER BY needs to be one of the column names in the database. By the way, I'm confused by you say you want fatherid != '0' then fatherid = '0' Could you give more info on the column names and the needed result? There may be a better way to go about what you are trying to acheive... [img src=\"style_emoticons/[#EMO_DIR#]/wink.gif\" style=\"vertical-align:middle\" emoid=\":wink:\" border=\"0\" alt=\"wink.gif\" /]
  2. You can not store images in a database, just their names. You can then reference them by the name you have in the database. Make sense?
  3. rburch

    div tags

    Or a pop-up window - they give you complete control over the page - size, scrollbar, buttons, etc. - lots of options...
  4. rburch

    div tags

    You can't do this. Layers (div) work independant of tables or the rest of the page - kinda like floating over the top of the webpage, so they can't be contained inside the table. You will have to decide on a size smaller than the table and stick to it. [img src=\"style_emoticons/[#EMO_DIR#]/huh.gif\" style=\"vertical-align:middle\" emoid=\":huh:\" border=\"0\" alt=\"huh.gif\" /]
  5. The easy way to do this is by date, but if you don't want to do it that way... The only other way to do this, that I can think of, is to place them in an order by reference number, then when you add a new article, your script adds +1 to each reference number - bumping each one down in the list of ordered articles [img src=\"style_emoticons/[#EMO_DIR#]/wink.gif\" style=\"vertical-align:middle\" emoid=\":wink:\" border=\"0\" alt=\"wink.gif\" /] .
  6. Nope. That will only give you this from my example: 12005 & 125 & 2006-05-04 11:05:00 I need the latest result for each unique id. Anyone else?
  7. I don't know how to do this in PHP, but you can do this in javascript - although it is not fool-proof. Go to: [a href=\"http://javascript.internet.com/page-details/no-right-click.html\" target=\"_blank\"]http://javascript.internet.com/page-detail...ight-click.html[/a]
  8. I'm no expert, but I accessed/connected to databases on my own server and others. When I access my own I use "localhost", but when I use the other offsite it is the IP address. The rest of the connection info is the same.... My suggestion to you is to use the IP address only, so that it can be accessed by both onsite and offsite users.
  9. I don't think that will work, because I would need to run that "sort()" on each group of id's that are the same. Maybe this will help... My results look like this: (id) & (cd) & (date) 12003 & 451 & 2006-05-01 12:35:00 12005 & 358 & 2006-05-02 12:45:00 12005 & 348 & 2006-05-03 14:25:00 12006 & 10 & 2006-05-03 22:30:00 12003 & 350 & 2006-05-03 9:35:00 12005 & 125 & 2006-05-04 11:05:00 I need my results to end up like this: 12006 & 10 & 2006-05-03 22:30:00 12003 & 350 & 2006-05-03 9:35:00 12005 & 125 & 2006-05-04 11:05:00 Make sense? Any new ideas?
  10. I need some experts advice on this one. I've worked on a solution for awhile and am getting no where. I need to select the newest entry for each id from a transactions table. Right now each id# can leave multiple records in the table and I am selecting them by "SELECT id, cb FROM $table_name WHERE date <='dateq' AND cb > '#'" (I could group them by id, but I don't see how this would help.) Now I just need to take it one step more, because this result gives me (or could give me) multiple entries from this table for each id, but I only want to display the latest entry for each id, without knowing what the id's are. I hope that made sesne.... Is this a secondary sort that needs to be done by a function I write or can it be done some other way? If it is a function, any ideas how to write it? Thanks in advance!!!
×
×
  • 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.