Jump to content

urbandsigns.com

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

urbandsigns.com's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. When I do a select from my MySQL database it returns a 24 hour time. I want it to be 12 hour time. Any simple way to do this in a Select?
  2. Nevermind, just realized the the last number is seconds and not milliseconds. It is working correctly. Thanks for the help.
  3. Thanks for the response, but this isn't adding correctly. Here is my code based on what you posted: [code]$total2 = date('H:i:s',strtotime($_GET["score"])+$_GET["cones"]);[/code] Scores: 00:33:26 Cones: 39 Total2: 00:34:05
  4. I have time (no date) in the format: 00:00:00 and I need to add a few seconds to it, how do I do this?
  5. No I didn't, I assumed DateAdd was a PHP function. Guess I better look into it more.
  6. I made a flash AutoX game (http://www.gdub.net/games.php). At the end it sends the lap time & number of cones hit to a php page that takes the information, records it in a MySQL database, and posts the scores. The problem is I have to add the lap time + 1 second for each cone. I did some research and found the DateAdd function which in theroy should work, but it doesn't. Below is my code, everything works except the $total2 section with the DateAdd function: [code]<? $name = $_GET["name"]; $score = $_GET["score"]; $cones = $_GET["cones"]; $minutes = $_GET["minutes"]; $seconds = $_GET["seconds"]; $milli = $_GET["milli"]; $total = $seconds + $cones - 1; $total2 = DateAdd('s', $_GET["cones"], $_GET["score"]); $result = mysql_query("INSERT INTO ***** (name, score, cones, date, total, total2) VALUES ('$name','$score','$cones',Now(),'$minutes:$total:$milli','$total2')") or die(mysql_error()); ?>[/code]
  7. [!--quoteo(post=376726:date=May 24 2006, 11:31 AM:name=Pmzine)--][div class=\'quotetop\']QUOTE(Pmzine @ May 24 2006, 11:31 AM) [snapback]376726[/snapback][/div][div class=\'quotemain\'][!--quotec--] Hey, Hopefully a quick and easy question, I have a MYSQL database with reviews in it and an A-Z archive. For instance, if you click 'A' link it will show all reviews beginning with the letter 'A'. I want to be able to grab the reviews beginning with a numeric value though and can't figure out the character to pass to the SQL statement. Any ideas? [/quote] Pass in a # sign and then do an If statement for each number.
  8. I would send it to a new page once the link is clicked. Then do a select where ID = $ID and it will display just the information about that 1 restaurant. Does that help or am I reading your question wrong?
  9. Good point. Meant to say new to PHP and MySql. Now how about some help?
  10. Ok new to PHP. I've done this before with MSSQL but having a hard time in php. [code]select (case when collectionImg = '' then '' else '<img src=' collectionImg '><br>' end) as collectionImg[/code] Basically I want it to check to see if there is a collectionImg. If there is, build the html for me, if not do nothing. Everything works except it doesn't display the collectionImg variable. How do I need to format that part (collectionImg) to get it to work?
  11. [code]SELECT * FROM table WHERE (id ='4' or id ='5' or id ='6)'[/code]
×
×
  • 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.