Search Results - ASP Message Board

Search:

Type: Posts; User: Bill Wilkinson

Page 1 of 20 1 2 3 4

Search: Search took 1.76 seconds.

  1. Instead of doing this: $non_displayables =...

    Instead of doing this:

    $non_displayables = array(
    '/%0[0-8bcef]/', // url encoded 00-08, 11, 12, 14, 15
    '/%1[0-9a-f]/', // url encoded 16-31
    '/[\x00-\x08]/', //...
  2. That was an EXAMPLE! That would be for page #2...

    That was an EXAMPLE! That would be for page #2 when showing 10 items per page.


    $PAGESIZE = 10; // or whatever you want it to be


    $page = (int) $_REQUEST["page"];
    $startat = ($page-1) *...
  3. Get rid of the CONVERTs to change the date...

    Get rid of the CONVERTs to change the date format. Let PHP do that.

    The other alternative is to do something like

    CONVERT(VARCHAR(11), b.DueDate, 106) AS PHPDueDate
    so that an ORDER BY...
  4. Okay, you are going to have to play with this on...

    Okay, you are going to have to play with this on your own DB, but I got it to work in a simple case:

    SELECT c.* FROM
    ( SELECT TOP 1000000 ROW_NUMBER() OVER(ORDER BY orderid) AS RowID,...
  5. YES YES YES! The problem is that the ORDER BY is...

    YES YES YES! The problem is that the ORDER BY is in the WRONG PLACE!!! Try this:

    $sql = "
    SELECT c.* FROM (
    SELECT DISTINCT ROW_NUMBER() OVER(ORDER BY b.ID) AS RowID, b.ID,
    ...
  6. You know, even that code probably isn't right. ...

    You know, even that code probably isn't right. I'll bet you will find problems with it and will have to revert to just
    ORDER BY $sort $order

    But I think I have an idea for a final answer...hang...
  7. Ahhh...I think you got it! You may recall that I...

    Ahhh...I think you got it! You may recall that I suspected that part of the query early on. I should have looked at it more closely!

    SQL Server is terrible for paging, compared to MySQL. There...
  8. Replies
    17
    Views
    1,339

    Part 2:

    Part 2:



    <%
    ' now start the *real* code...
    '
    ' first, a function to get a JavaScript date value...
    '
    Function jsDate( dt )
  9. Replies
    17
    Views
    1,339

    Here is what I think is the final version (...

    Here is what I think is the final version ( barring bugs). It does everything that is advertised in the 7 features. Give it a try.

    PART 1:

    <!DOCTYPE html>
    <html>
    <head>
    <title>List files...
  10. If this doesn't fix it, then DEBUG DEBUG DEBUG. ...

    If this doesn't fix it, then DEBUG DEBUG DEBUG.

    Add in TONS of echo "I am here"; (where here is of course MUCH more descriptive and dumps out important variables and and and...

    No different...
  11. There's an error in my prior post. If the $page...

    There's an error in my prior post. If the $page is changed, the $prev_page and $next_page values will not be set.
    Fixed code for that section:


    if ( $sort == $_SESSION["SORT"] && $order ==...
  12. There ought to be a prettier way to do this, but...

    There ought to be a prettier way to do this, but I think this should work:

    <?php
    // select default
    $sortDefault = 'ID';
    $orderDefault = "ASC";
    $per_page = 20; // Per Page


    // arrays of...
  13. Aw, come on. This one is obvious. echo "[

    Aw, come on. This one is obvious.

    echo "[ <a href='$_SERVER[SCRIPT_NAME]?Page=$i'
    WHEERE there are you passing the sort or the order???

    LOOK at the code:


    if ( $sort == $_SESSION["SORT"]...
  14. This is really pretty easy. Virtually identical...

    This is really pretty easy. Virtually identical to how yoo'd do it in ASP code.

    <?php
    // select default
    $sortDefault = 'ID';
    $per_page = 20; // Per Page


    // select array
    $Columns =...
  15. Replies
    17
    Views
    1,339

    And this is part 2:

    And this is part 2:



    <script type="text/javascript">
    var allFiles = [ ];


    function FS( isd, fname, fext, fsize, fcreate, fmod )
    {
  16. Replies
    17
    Views
    1,339

    I have to break this post into two parts. This...

    I have to break this post into two parts. This idiot forum has a 10,000 character limit, per post.

    You mean like this:

    <!DOCTYPE html>
    <html>
    <head>
    <title>List files with links to...
  17. Oh, never mind, I see it. It's here: WHERE...

    Oh, never mind, I see it. It's here:

    WHERE c.RowID > $row_start AND c.RowID <= $row_end ORDER BY $sort $order
    When you change sort order, you MUST go back to page 1. If you do that, I think the...
  18. Well, then, it's trash code. Apparently it is...

    Well, then, it's trash code. Apparently it is using JavaScript to sort what is on the page.

    Throw it out and rewrite it.

    http://clearviewdesign.com/Newbie/Demos/ServerSideSort.asp

    Just be...
  19. Replies
    17
    Views
    1,339

    How about we toss that code and do all the...

    How about we toss that code and do all the sorting in the browser?

    Here's my first effort. It does *NOT* create links for either viewing the files or changing to other directories. Coming soon....
  20. What do you mean by "only sorts the current...

    What do you mean by "only sorts the current page"?

    You mean if you change WHAT you are sorting by? Or all the time?

    This is a terrible idea:

    $sql = "SELECT * FROM bids WhERE BidStatus=1...
  21. Replies
    17
    Views
    1,339

    But it is YOUR CODE (well, mine originally...but...

    But it is YOUR CODE (well, mine originally...but yours now) that is outputting that! Just STOP doing it!

    Untested, but I think the only thing you need to change is this line:
    ...
  22. Replies
    17
    Views
    1,339

    I'm lost. If you want to list the files and show...

    I'm lost. If you want to list the files and show them as links, then how do you avoid the page being full of links?

    Example, please?
  23. Well, there is clearly one BIG bug in there: ...

    Well, there is clearly one BIG bug in there:

    SQL = "SELECT CustomField1 FROM KPUsers WHERE KPUser='" & name & "' AND KPPassword = '" & pwd & "'"

    ...
    Response.Write RS("CustomField1").value &...
  24. View Post

    <a href="#" onclick="parent.location.href='logout.php';">Log Out</a>
  25. SO show the XML. It probably doens't have such...

    SO show the XML. It probably doens't have such an element.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4