Jump to content
Larry Ullman's Book Forums

fumble

Members
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

0 Neutral

About fumble

  • Rank
    Newbie
  1. Thanks Larry Lock down fickness. It's a thing! ....so, as an example, using script 9.7, p293 (in my book), line 43..... $q = "SELECT user_id FROM users WHERE (email='$e' AND pass=SHA1('$p')) "; Are you saying that this could/should be written as.. $q = "SELECT user_id FROM users WHERE (email='$e' AND pass=SHA1('$p')) " - without the ending semicolon? Thanks again.
  2. Hi Larry "You should not end your queries with a semicolon in PHP, as you do when using the mysqli client........." Undoubtedly I'm being really fick, but I'm struggling with the above? I've searched for examples of this advice in script 9.3, but to no avail. It's from the top TIP in the second column, p280. Any help much appreciated. Warm Regards
  3. Thank you so much for your reply HartleySan. Things becoming clearer now. In hindsight, I may have misled unintentionally with the wording of the second question. However in saying that each image tag requires a separate HTTP request, you have answered the question I meant to ask! I think I know how to proceed now. As an observation, msg board pages with very many posts must create a huge amount of traffic between browser and image folders? And as for photo galleries.....?!! Thank you again.
  4. Hi I transferred my site to a hosted Server recently and the issue of displaying images - user avatars associated with forum posts ( avatars are located in an images folder outside of the root directory ) - reared it's head. Previously, on my local host, I accessed the users avatars using code similar to the following: $thumb = '<img src="../uploads/avatar.jpg">'; Following much heartache, I now realise ( as highlighted in CH.11 ) that a user's browser cannot access a file which is outside of the root folder. As Larry points out, a proxy file is required. My quest
  5. Thank you Antonio. I will have to revisit my understanding - or lack thereof ! - of joins. I have managed to date using the AND expression to join tables, but your example is the way forward. I'll have a go at rewriting my query. Really appreciate the help.
  6. Hi all. I have designed a forum ( with great help from this book - thanks Larry ) which seems to be working well. One thing still bugs me though. I have a table for forum threads which contains among others, the following two colums: thread_originator_id and last_reply_poster_name. Ideally I would like to have both columns contain each forum user's ID ( numeric ). However, I can't write the Query ( believe me, I tried - for days! ) which returns both users names ( using a join between two tables - users and threads_forum ). CONCATing one user is easy, but two ?? As a
  7. Hi everyone. I'm new to the forum. Just about finished the book. Fantastic read and thus far, has been one of the best learning experiences of my life. Many thanks Larry. One question I have relates to this topic. Perhaps someone could give a helpful analogy to better explain ( to me ) the meaning behind 'saving server resources' re: mysqli_free_result(); Specifically, if a particular php script has several separate database queries, if one uses this function appropriately after each query, are the results of each query useable at the end of the script, or are the resu
×
×
  • Create New...