Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. You can't combine two statements into one query. So use a second variable, and run both.
  2. I don't know what you mean by "cell", "data", and "template". But I would still do one each.
  3. That's not a valid date format... you need YYYY-MM-DD.
  4. That's not possible... echo the value of the counter variable, if it's more than one, then there's something else going on.
  5. Email as PK? No.
  6. What do price1 and price2 represent?
  7. A few things: 1) you likely don't need left joins except for the tables with senderid and notificationdate. 2) it would be preferable to store createdtime as a proper datetime field or timestamp, not integer. 3) your date restriction for created time means you don't need != 0 or IS NOT NULL. 4) if you simply want to null out everything for senderid = 1, that's different than excluding them altogether.
  8. Since it doesn't sound like the details are shared, make tables called guitar_detail, laptop_detail, etc., corresponding to your category name.
  9. No, you're not... that not's what fetch_array() does.
  10. Another table....
  11. You want single quotes around your string literal, not back-ticks: $result = mysql_query("SELECT * FROM $bookseriesfordisplay WHERE book_title = '$booktitlefordisplay'")
  12. Shouldn't be anything wrong with that at all...
  13. How are you storing the date? What column type?
  14. Nope... not unless you change the IDs.
  15. What does "Includes numbers" mean? Echo $sql.
  16. Well, you can push then onto an array in php and join them with commas, or you can use group_concat.
  17. Well, you can push then onto an array in php and join them with commas, or you can use group_concat.
  18. This is being discussed in another thread right now...
  19. Yes, but only to return true/false.
  20. I'm a bit sleepy this morning... maybe something like this (untested): SELECT loc, tallly FROM ( SELECT loc, COUNT(loc) AS tally FROM $table WHERE DAYNAME(thedate)='$today' GROUP BY loc ) AS counts GROUP BY loc HAVING tally = MIN(tally)
  21. Yes, now I see what you mean... you can't accomplish that in a single statement... you'll have to join the table back to it, and then use MIN().
  22. Well, a REGEXP can do that, too.
  23. Why not order by LEFT(movieName, 1)?
  24. That's nice... do you have an actual mysql question? Because there are plenty of tutorials if you want the entire code written for you.
×
×
  • 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.