Jump to content

-envious

New Members
  • Posts

    2
  • Joined

  • Last visited

-envious's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I'll check out PDO, thanks!
  2. Wonder if someone can give me a hand. My select statement is working on command line, but not in PHP. SELECT id,DAY(date),MONTH(date),title,location,address,timestart,timeend,ticketprice,buynowaddress FROM Events WHERE active = true ORDER BY date DESC But when I put it into PHP, I get an error: Notice: Undefined index: date in /var/www/html/site.com/evets.php on line 9 Here is the PHP: <?php include("dbconnect.php"); $result = mysql_query("SELECT id,DAY(date),MONTH(date),title,location,address,timestart,timeend,ticketprice,buynowaddress FROM Events WHERE active = true OR$ while ($row = mysql_fetch_array($result)) { echo "<p>ID: " .$row['id'] ."<br>"; echo "Title: " .$row['title'] ."<br>"; echo "Date: " .$row['date'] ."<br>"; echo "Location: " .$row['location'] ."<br>"; echo "Address: " .$row['address'] ."<br>"; echo "Time Start: " .$row['timestart'] ."<br>"; echo "Time End: " .$row['timeend'] ."<br>"; echo "Ticket Price: " .$row['ticketprice'] ."<br>"; echo 'Buy Ticket Link: <a href="' .$row['buynowaddress'] .'">address</a><br></p>'; echo "<hr>"; } ?> Thank you all in advance
×
×
  • 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.