Jump to content

Search the Community

Showing results for tags 'groups'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 2 results

  1. Hi all! I'm working on a simple script to manage a webcomic, which will have multiple pages in each chapter. I'm trying to create an archive page which will show thumbnails for every comic, organized by chapter, such as: Chapter 1 Title - Page 1 - Page 2 - Page 3 Chapter 2 Title - Page 1 - Page 2 - Page 3 Etc In MySQL, I have two tables: Chapter (ChapterID, Name) Page (PageID, Chapter, Image, Thumbnail) The only method I could find for achieving this on Google suggested using a query to obtain all of the chapters from the chapter table, and then while looping through the results, use a second statement with a WHERE clause to select the comics for that chapter. However, that just seems like poor practice and sounds horribly inefficient once too many chapters are added. I'm wondering if there's a more efficient way to approach this, so that I can organize my results into groups? If someone could simply give me the logic to use or nudge me in the right direction, I'd gladly appreciate it Thanks, Joey
  2. I've got the following code below and it works great. It's list all the entrys in the database that meet those specifications and it's sorted by the title of need and the ID. My question is is there a way to put a space between the different titled groups. Right now it looks like this: Title1 Title1 Title1 Title2 Title3 Title3 But I'd like for it to look like this: Title1 Title1 Title1 Title2 Title3 Title3 I'm not sure how to go about it. Thanks for the help! $query = mysql_query("SELECT * FROM needs WHERE status !='hidden' AND status !='denied' AND status !='deleted' AND status !='expired' AND (workerfoldername IS NULL OR workerfoldername='') AND (needsusername='$username' OR workerusername='$username') ORDER BY titleofneed, ID"); echo "<table border='1'><tr><th><center>Title of Need</center></th><th><center> Organization </center></th><th><center>Needs Username</center></th><th><center>Worker Username</center></th><th><center>City, State</center></th></tr>"; while ($rows = mysql_fetch_array($query)) { $id = $rows['ID']; $status = $rows['status']; $firstname = $rows['firstname']; $city = $rows['city']; $state = $rows['state']; $phone = $rows['phone']; $email = $rows['email']; $typeofneed = $rows['typeofneed']; $description = $rows['description']; $workername = $rows['workername']; $workeremail = $rows['workeremail']; $workerphone = $rows['workerphone']; $completiondate = $rows['completiondate']; $needsusername = $rows['needsusername']; $workerusername = $rows['workerusername']; $howmanypeopleneeded = $rows['howmanypeopleneeded']; $howmanypeoplesignedup = $rows['howmanypeoplesignedup']; $titleofneed = $rows['titleofneed']; $theneedsfoldername = $rows['needsfoldername']; $theworkerfoldername = $rows['workerfoldername']; if (($needsusername == $username && $theneedsfoldername == '') || ($workerusername == $username && $theworkerfoldername == '')) { $orgname = $rows['orgname']; $expiredate = $rows['expiredate']; echo " <tr><td>$titleofneed</td><td>$orgname</td><td>$needsusername</td><td>$workerusername</td><td>$city, $state</td><td>view more</td></tr> "; } }
  • 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.