Jump to content

accent

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

accent's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have a users table and a orders table. I need to display the all the users on the page with the latest order for each user. Can I do that in one Select statement? I tried the following but it will return all the orders. I only need one order for one user. SELECT orders.orderid, users.username FROM orders, users WHERE orders.userid=users.id ORDER BY orders.datetime DESC; Any ideas? Thanks a lot!
  2. Do I have to use $myrow[0] instead of $myrow["firstName"]? $result = mysql_query("select firstname, lastname from user"); $myrow = mysql_fetch_row($result) ; echo $myrow[0] works but echo $myrow['firstname'] doesn't. What setting do I need to change to make $myrow['firstname'] works? Thanks!
×
×
  • 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.