Jump to content

akolson

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

akolson's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Never mind, I found it.  I just needed to use an ORDER BY LEAST(x,y) statement... http://www.phpfreaks.com/forums/index.php/topic,25731.0.html
  2. I've got a table with two timestamp columns per row.  I'd like to sort all rows using the lesser of the two timestamps for each row. I'm getting an error on a statement that tries to use ORDER BY with an IF(x>y,y,x) statement.  Is there some other way to do this? Here's the actual situation and the script I've tried if it helps... Situation: Each row is an entry pulled from several RSS feeds and if someone is future dating their posts I want to substitute in the 'added' timestamp instead of the 'published' timestamp whenever the published date is greater than the added timestamp. [code]SELECT e.cid, e.id, e.url, e.title, SUBSTRING( e.description, 1, 250 ), IFNULL(e.pubdate, e.added), f.siteurl, f.title, IF ( length( e.description ) =0, '', concat( substring( e.description, 1, 75 ) , '...' ) ) FROM feeds_item e INNER JOIN feeds_channels f ON (e.cid = f.id) ORDER BY IF(e.pubdate>e.added,e.added,e.pubdate) DESC LIMIT 100">[/code]
  3. Sure enough, the app was written before the default for reister_globals was turned off so turning on register_globals did it. Thanks. I'd take your advice of moving to superglobals but I've decided to move away from this particular web application so I probably won't invest the time.
  4. I've switched from a shared host to a virtual dedicated server and my web application has stopped functioning. The php scripts still run, and the site is successfully connecting to and displaying data from MySQL. However, any script that requires a temporary (?) variable fails...logins, variables in URL strings, etc. As an example, the following URLs should each sort a list differently, but they both return the default sort (most recent) and the next/previous buttons return the same. [a href=\"http://www.houseblogs.net/webring/?limite=10&classe=date&ordre=DESC\" target=\"_blank\"]http://www.houseblogs.net/webring/?limite=...date&ordre=DESC[/a] [a href=\"http://www.houseblogs.net/webring/?classe=site_nom&ordre=ASC\" target=\"_blank\"]http://www.houseblogs.net/webring/?classe=site_nom&ordre=ASC[/a] Another example, the admin login panel doesn't recognize any inputs: [a href=\"http://www.houseblogs.net/webring/admin.php\" target=\"_blank\"]http://www.houseblogs.net/webring/admin.php[/a] Any thoughts on why this might happen? I'm assuming that some setting must be different on the new server, but strangely other web apps that also made the move still function properly.
×
×
  • 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.