Jump to content

Aimee

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

About Aimee

  • Birthday 04/27/1983

Profile Information

  • Gender
    Female
  • Location
    Bournemouth

Aimee's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Landing pages? Or if you mean an actual DNS set up it's just called Web Forwarding I think?
  2. Can you not do a recursive function instead? I imagine it would be more flexible. So in my example I'm just returning a list of IDs but you get the point.. function getChildren(parentID) { $sql = "SELECT id FROM categories WHERE parentID='$parentID'"; // loop through results and for each one call: $allChildren .= "$id,"; $allChildren .= getChildren($id); return $allChildren; } $allChildren = getChildren("");
  3. I'm not sure how fussy it is but you're using the wrong type of quotes - try using ` instead of '. It worked for me when I ran your query with those quotes replaced.
  4. I think day of the month is date('d') - date('l') is day of the week. However this will be local to the server time not the users. I believe you have to use javascript to get the local time for the user. var d = new Date() var day = d.getDate(); ?
  5. Yes what corbin has suggested will do that. I'd do something like this to go around your delete statement: // find out the number that this one was placed at $sql = "SELECT sort_order FROM table WHERE id = {$_POST['id']}"; $result = mysql_query($sql); $row = mysql_fetch_row($result); // your original delete $sql = "DELETE FROM table WHERE id = {$_POST['id']}"; $deleted = mysql_query($sql) or die(mysql_error()); // update remaining records $sql = "UPDATE table SET sort_order=sort_order-1 WHERE sort_order > $row[0]"; $updated = mysql_query($sql);
×
×
  • 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.