Jump to content
Larry Ullman's Book Forums

Luke

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by Luke

  1. Hi again. I just have a question on the second last pursue exercises for chapter 3 (page 118) about the maximum range for distance. I've created the form to optionally search by range with no problem but my SQL is coming up with errors.

     

    I added the WHERE distance<=X to the query as noted in page 107, however adding this comes up with SQL syntax errors. I think this SQL could be causing errors due to it using a WHERE on an alias, but I could be wrong. Any help on this would, as always, be greatly appreciated.

     

    Example SQL:

    SELECT name, CONCAT_WS('', address1, address2), city, state, stores.zip_code, phone, ROUND(return_distance(39.09, -94.58, latitude, longitude)) AS distance FROM stores WHERE distance<=1000 LEFT JOIN zips USING (zip_code) ORDER BY distance ASC LIMIT 3

  2. Hi Larry. I was wondering if you could help me with a persue point on the first chapter. I am having a bit of trouble on the 7th persue point from going to showing all the tasks by removing the WHERE clause to trying to indicate and specifically format uncompleted and completed tasks differently in the same function.

     

    Any help on this would be greatly appreciated, though I'm finding the new review and persue section very useful for reinforcing the chapter.

×
×
  • Create New...