Jump to content
Larry Ullman's Book Forums

Search the Community

Showing results for tags 'resorting a query'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Single Editions
    • Modern Javascript: Develop and Design
    • The Yii Book
    • Effortless Flex 4 Development
    • Building a Web Site with Ajax: Visual QuickProject
    • Ruby: Visual QuickStart Guide
    • C++ Programming: Visual QuickStart Guide
    • C Programming: Visual QuickStart Guide
    • Adobe AIR: Visual QuickPro Guide
  • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (5th Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)
    • PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (1st Edition)
  • PHP for the Web: Visual QuickStart Guide
    • PHP for the Web: Visual QuickStart Guide (5th Edition)
    • PHP for the Web: Visual QuickStart Guide (4th Edition)
    • PHP for the Web: Visual QuickStart Guide (3rd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (2nd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (1st Edition)
  • Effortless E-commerce with PHP and MySQL
    • Effortless E-Commerce with PHP and MySQL (2nd Edition)
    • Effortless E-Commerce with PHP and MySQL
  • PHP Advanced: Visual QuickPro Guide
    • PHP Advanced and Object-Oriented Programming: Visual QuickPro Guide (3rd Edition)
    • PHP 5 Advanced: Visual QuickPro Guide (2nd Edition)
    • PHP Advanced: Visual QuickPro Guide
  • MySQL: Visual QuickStart Guide
    • MySQL: Visual QuickStart Guide (2nd Edition)
    • MySQL: Visual QuickStart Guide (1st Edition)
  • Other
    • Announcements
    • Newsletter, Blog, and Other Topics
    • Forum Issues
    • Social

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 1 result

  1. Assuming I have made this query: $q = "SELECT c_frame + c_glass + c_materials + c_fees + c_commissions + c_other AS total_cost, image_title, sold, price, b_sell_price, print_available, DATE_FORMAT(date_created, '%Y-%m-%d') AS dc, DATE_FORMAT(date_added, '%Y-%m-%d') AS da, DATE_FORMAT(b_date_sold, '%Y-%m-%d') AS ds FROM art WHERE ($date_col_name >= '$begin_date') AND ($date_col_name <= '$end_date') ORDER BY $order_by" $r = @mysqli_query ($dbc, $q); If I save the value of $r so it is available after re-sending the page from the server, can I then resort the query differently than the original sort rather than making the same query again? I have column headings in my table that look like this: <th><a href="overview.php?sort=image_title">Title</a></th> (so the data can be resorted) However the original query (above) has selected data according to a date range. I would like to keep the exact results from the original query and sort it according to the column specified in the <th></th>. I hope I am being clear.
×
×
  • Create New...