Jump to content


Staff Alumni
  • Posts

  • Joined

  • Last visited


About AndyB

  • Birthday 11/07/1944

Contact Methods

  • Website URL

Profile Information

  • Gender
    Not Telling
  • Location

AndyB's Achievements

Regular Member

Regular Member (3/5)



  1. The syntax for your query ought to be SELECT from tablename ORDER by fieldname DESC LIMIT 25. If the value of $total happened to be 250, do you actually a database field named 250? I doubt it. And that's why you get an error.
  2. Curious and curiouser. I'm running FF and XP Pro locally. The php script is running on a *nix server so it appears we have identical environments. I don't see that the disabled functions would have any effect at all. One difference between the code I have working and the code you're having trouble with is that mine generates a .txt file whereas you're trying to generate a .xls file. Needless to say, my .txt file opens perfectly with Excel.
  3. It's not clear why my most recent code works for me with Firefox ( on a PC but fails for you. What's your version? What's your OS?
  4. No. Suppose you retrieve the date from the database as the variable named $the_date. list($y,$m,$d) = explode("-", $the_date); // gets y, m, and d from the stored date $some_date = date("Y-m-d", mktime(0,0,0,$m,$d,$y+1)); // $some_date is one year later Does that shed some light on things?
  5. http://www.w3schools.com/css/pr_background-position.asp background-position: top center;
  6. You should remove the zillion tabs between the end of the textarea opening tag and the start of the textarea closing tag. My guess is that'll fix it.
  7. well, since day is a number anyway why not just skip the number format thing and echo $d
  8. $year = mysql_query("SELECT dob FROM $table WHERE username = '$mysite_username'"); $year1 = mysql_fetch_array($year); $dob = $year1['dob']; // this line is revised list ($y, $sm, $d) = explode ('-', $dob); // slight change echo number_format($d); I assume it's a single result, so no while needed.
  9. We don't know your database field names, etc. Show us your efforts first, then we'll help.
  10. open the script file using whatever editor you use. Copy the file contents to your clipboad. How that's done depends on your editor. 'Reply' to this thread and paste your clipboard into the reply between code tags
  11. Look at the use of strtotime() in example #1 at http://ca.php.net/manual/en/function.time.php Using yyyy-mm-dd format allows you to perform all the manipulation of dates that you'll ever need without worry about what if the month changes, what if the year changes, etc.
  12. If want to store useful dates in a database, also use the ISO standard format - yyyy-mm-dd. That allows you to sort in calendar order, do 'math', and you can use whatever format you want to display the date as needed.
  13. http://www.codertools.com/css_help_guide/css_background-position.aspx
  14. Before executing the query, echo $_u and examine it to see if it makes sense and is in the form you expect and contains the data you expected.
  • 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.