Jump to content

treez

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

treez's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Does anyone know how to do this? I just wanna make it so it fetches the next ID in the database.
  2. I have a thing that is listing me some stuff from my database. [code]$jo_result = mysql_query("SELECT * FROM users_pages ORDER BY views DESC LIMIT 30"); while ( $jo_row = mysql_fetch_array($jo_result) ) {[/code] But when it lists it by VIEWS it goes like this: 97 95 9 85 84 80 8 etc How can I stop this and make it go properly?
  3. I have a build-your-own-website website and one of the add-ons is a gallery. In my gallery table I have the following fields: id, owner, timestamp, filename, thumbname, title, description, category, ordering Currently it shows the thumbs in a list and the user clicks each thumb and it just opens the fullsize image. I wanna make a page that you can click a thumb, view the image but also click NEXT or PREVIOUS. The only way I know of this is if I use a WHERE id=(id+1) type thing. but these arent always going to be consecitive for that user. How can I make it so it views the NEXT one thats viewed under ORDERING (ordering is sometimes blank too) Main SQL for the initial listing: $query="SELECT * FROM gallery_images WHERE category = '$cat' AND owner = '$usern' ORDER BY ordering DESC LIMIT $offset, $limit";
  4. I have this: $nbresult2 = mysql_query("SELECT * FROM gallery_images WHERE owner = '$user' ORDER BY ordering"); I want it to firstly order everything under the "category" field and then the "ordering" field. So it'll order the results for the "category" and then for each category order them under "ordering" i wanna do this as simply as possible and on the same line. I tried ORDER BY category THEN ordering but I dont think that exists. Any ideas?
  5. On my users table on my mysql db i have a field called "lastlogin". This is the date when the person last logged on my site and is in the format "hh:mm:ss - dd:mm:yyyy" eg"13:46:28 - 18/11/2005" I want to make something so I can see who hasnt logged in within (x) amount of days. I know know to explode it so I can get just the 18/11/2005 bit but how would I make it so I can list only those entrys that havent logged in within (x) days?
×
×
  • 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.