Jump to content

StrangeWill

Members
  • Posts

    47
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

StrangeWill's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. So I have a table that looks like this: +-------+---------+-----+-----+ | pageid| time | text| title | +-------+---------+-----+-----+ | 1 | 100 | text| old +-------+---------+-----+-----+ | 2 | 200 | text| none +-------+---------+-----+-----+ | 1 | 300 | text| new +-------+---------+-----+-----+ I do a group by pageID, but when I do an order by time, the last updated page is page two. Any ideas on how I can group it, get the title for the first entry, but the time for the most recent? Or should I store the most recent entry time? This is my SQL: SELECT * FROM `pages` GROUP BY `pages`.`pageid` ORDER BY `pages`.`time` DESC What I want returned: +-------+---------+-----+-----+ | pageid| time | text| title | +-------+---------+-----+-----+ | 1 | 300 | text| old +-------+---------+-----+-----+ | 2 | 200 | text| none +-------+---------+-----+-----+ What I get returned: +-------+---------+-----+-----+ | pageid| time | text| title | +-------+---------+-----+-----+ | 1 | 100 | text| old +-------+---------+-----+-----+ | 2 | 200 | text| none +-------+---------+-----+-----+
  2. "I have a covering INDEX on that table which covers all the fields used in the friends table" Well, how do you expect it to be more efficient when your index is as large as the table itself? Stick to only searchable items?
  3. I'm guessing you want to do this: mysql_query("INSERT INTO gradinfo (f_name,l_name,email,pass,gender,birthm,birthd,birthy,address1,county,country,telephone,location) VALUES ('$fname','$lname','$email','$pass','$gender','$birthm','$birthd','$birthy','$address1','$county','$country','$phone','$location')");//Set SQL mysql_query("INSERT INTO gradcoll (u_course, u_id) VALUES ('$course', '$id')"); mysql_query("INSERT INTO gradwork (occupation, u_id) VALUES ('$occupation', '$id')");
  4. Yeah, and it also tends to send way more data than is actually needed, and ends up requiring a hefty overhead of dealing with the data. Should I just loop through queries, or create a separate table, then do a call if the parent HAS children?
  5. Currently I'm roughly running with this (sorry if it isn't exact, but it's a general idea, I don't have the SQL statement right in front of me at the moment..) SELECT table.*, tablechild.* FROM table LEFT JOIN table AS tablechild ON tablechild.parentid = table.id However that only gets me one child deep. I could just do a loop: for(each record) { SELECT table.* FROM table WHERE parentid=currentTableID }
  6. So I've been working on trying to get the information I want out of one query, but the way the database is structured seems to make it extremely difficult to do such. I don't even know if I can restructure it in a way to get the information I want out of one query. So in my mind I say "why not just run more than one query?", alas how many queries is too many to run during a page load? They're all pretty simple queries (two pieces of data, one left join, where an ID is a value). Problem is I could need to do this some 20-30 times, or even more. Is this okay, or should I be looking at another method? Just in case another method is suggested, I have this (for example) as the table: id | parentid | text 1 | 0 | Sometext 2 | 1 | ChildText 3 | 1 | OtherChildText 4 | 2 | ChildChildText Currently I can left join the table again on tablejoined.parentid = table.id, alas this only gets me one deep, and also returns a lot of data (will return the id and text of the parent again and again and again for every child item, seems like a waste of memory/time). I would need something that is recursive till there are no children.
  7. So I'm a little bit new at OS modifications, I was hoping to hook up with a really simple OS, but all projects I find are usually garbage or use old compilers that don't seem to work anymore... Some people pointed me over to a handful of projects, but I made my mind up now, I definitely want to go Linux. It's something I'm becoming more and more familiar in, and I think would be the best to expand on a few projects I want to complete. Basically what I want: 1) An easy set of code to download, no proprietary CVS systems or lack of instructions. 2) An easy build that allows me to create a bootable ISO or live CD ISO 3) Console only access is fine, if not recommended. 4) The less included (games, applications, etc) the better. I've been having major difficulty finding something like this, Damn Small Linux wont run on an emulated machine, which is driving me crazy, and I can't find their CVS to begin with. Anyway, any pointers? Suggestions? I thought of trying Knoppix but their site is in like German, so finding the CVS, let alone trying to figure it out would be a nightmare. Tried Gentoo, their documentation was useless as far as compiling went, let alone which CVS directory I need... Basically I need a simple setup I can download, compile, make, and run, from there I can work on understanding once I know I have something I can work with. Linux from scratch is no good, I need to install and modify Linux... then like recompile it, which is going to end up with a lot of stuff I don't need... I have Linux box to compile on, but I want to modify source directly. Update: Downloading the source for Fedora 7 Hopefully I'm on the right path.
  8. I store two locations: [ebp+8] [ebp+4] These contain ADDRESSES. I want to be able to move from these addresses (the value of the address located at the value ebp+4, not the address of ebp+4, nor it's value) to a register (al to be exact). Any ideas? See the project demands that we use the offset, and for some reason digging through my entire textbook and as many websites as I can find, I cannot see how to move to value of the register whose value is stored at ebp+4. Basically: ebp+4 = 004000h I want the data in memory location 004000h
  9. I just play to have fun with friends, I am obviously not going to be the most kick ass, I don't have that much time to waste, it's about questing with friends, making jokes, having fun.
  10. If you have any faith in what you're selling it may be worth actually paying for a whole ecommerce setup.
  11. I've read some of it, a lot of what I've read have been mostly design ideas, and flowcharts, but no apis or documentation on how to communicate with their servers. Also their PHP API link is dead.
  12. So I've looked at the PHP toolkit, but it does no good for me... I need to be able to add more than one item, any ideas?
×
×
  • 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.