Professional Web Applications Themes

PhpMyadmin Help - PHP Development

Hi All Hope this is the right group I'm using phpmyadmin When I start up phpmyadmin it list my table fields like v_255_1 v_255_2 v_255_10 v_255_3 v_255_15 v_255_4 What I want is to sort it so it list them like v_255_1 v_255_2 v_255_3 v_255_4 v_255_10 v_255_15 How can I do this please Regards John...

  1. #1

    Default PhpMyadmin Help

    Hi All

    Hope this is the right group

    I'm using phpmyadmin
    When I start up phpmyadmin it list my
    table fields like

    v_255_1
    v_255_2
    v_255_10
    v_255_3
    v_255_15
    v_255_4

    What I want is to sort it so it list them like
    v_255_1
    v_255_2
    v_255_3
    v_255_4
    v_255_10
    v_255_15


    How can I do this please

    Regards

    John

    hope@hope.com Guest

  2. #2

    Default Re: PhpMyadmin Help

    [email]hopehope.com[/email] wrote:
    > What I want is to sort it so it list them like
    > v_255_1
    > v_255_2
    > v_255_3
    > v_255_4
    > v_255_10
    > v_255_15
    >
    >
    > How can I do this please
    >
    Here's a quick hack for the left navigation that I have tested on version
    2.5.6:

    Open the mysql_wrappers.lib.php file in the libraries/ directory and replace
    the PMA_mysql_tablename function with the following:

    function PMA_mysql_tablename($result, $i) {
    global $sorted_tables, $num_tables;
    if (!is_array($sorted_tables)) {
    $ordered = array();
    $sorted_tables = array();
    for ($x = 0; $x < $num_tables; $x++) {
    $ordered[] =
    PMA_convert_display_cht(mysql_tablename($resul t,
    $x));
    }
    natcasesort($ordered);
    foreach ($ordered as $name) {
    $sorted_tables[] = $name;
    }
    }
    return $sorted_tables[$i];
    }


    This hack does not fix the sorting issue with the db_details_structure.php
    file, but I'm sure that you will post again when you need help with this too
    ;-)


    JW




    Janwillem Borleffs Guest

  3. #3

    Default Re: PhpMyadmin Help

    Hi Jw

    Thank you for the script , yes it worked great for the left panel view

    BUT that was not the problem

    1.....I start Phpmyadmin

    2.....On the left panel I have all my data bases

    3.....Click on one of my data bases

    4.....Now in the left panel I see all my tables

    5....Click on one of the tables

    6....Now in the right panel I see all the structure for that table

    7....Under the fields I have all my field names

    8....This is where I wanted to sort them in order like

    v_255_1
    v_255_2
    v_255_3
    v_255_4
    v_255_10
    v_255_15

    Regards

    John





    On Sun, 9 May 2004 01:59:19 +0200, "Janwillem Borleffs" <jwjwscripts.com> wrote:
    >hopehope.com wrote:
    >> What I want is to sort it so it list them like
    >> v_255_1
    >> v_255_2
    >> v_255_3
    >> v_255_4
    >> v_255_10
    >> v_255_15
    >>
    >>
    >> How can I do this please
    >>
    >
    >Here's a quick hack for the left navigation that I have tested on version
    >2.5.6:
    >
    >Open the mysql_wrappers.lib.php file in the libraries/ directory and replace
    >the PMA_mysql_tablename function with the following:
    >
    >function PMA_mysql_tablename($result, $i) {
    > global $sorted_tables, $num_tables;
    > if (!is_array($sorted_tables)) {
    > $ordered = array();
    > $sorted_tables = array();
    > for ($x = 0; $x < $num_tables; $x++) {
    > $ordered[] =
    > PMA_convert_display_cht(mysql_tablename($resul t,
    >$x));
    > }
    > natcasesort($ordered);
    > foreach ($ordered as $name) {
    > $sorted_tables[] = $name;
    > }
    > }
    > return $sorted_tables[$i];
    >}
    >
    >
    >This hack does not fix the sorting issue with the db_details_structure.php
    >file, but I'm sure that you will post again when you need help with this too
    >;-)
    >
    >
    >JW
    >
    >
    >
    hope@hope.com Guest

  4. #4

    Default Re: PhpMyadmin Help

    [email]hopehope.com[/email] wrote:
    > 8....This is where I wanted to sort them in order like
    >
    > v_255_1
    > v_255_2
    > v_255_3
    > v_255_4
    > v_255_10
    > v_255_15
    >
    Not sure if this is what you mean, but try the following patch:

    - In the mysql_wrappers.lib.php file, add the following function:

    function PMA_natcasesort($array) {
    natcasesort($array);
    return array_values($array);
    }

    - In the tbl_query_box.php file, above line 155, insert the following call:

    $fields_list = PMA_natcasesort($fields_list);


    HTH;
    JW



    Janwillem Borleffs Guest

  5. #5

    Default Re: PhpMyadmin Help

    Janwillem Borleffs wrote:
    > Open the mysql_wrappers.lib.php file in the libraries/ directory and
    > replace the PMA_mysql_tablename function with the following:
    >
    Here's an improved implementation of this function:

    function PMA_mysql_tablename($result, $i) {
    global $sorted_tables, $num_tables;
    if (!is_array($sorted_tables)) {
    $sorted_tables = array();
    for ($x = 0; $x < $num_tables; $x++) {
    $sorted_tables[] = PMA_convert_display_cht(
    mysql_tablename($result, $x)
    );
    }
    natcasesort($sorted_tables);
    $sorted_tables = array_values($sorted_tables);
    }
    return $sorted_tables[$i];
    }


    JW



    Janwillem Borleffs Guest

  6. #6

    Default phpMyAdmin help

    If I am using phpMyAdmin, how would I execute the command "mysql
    --local-infile" ?

    bradfordh@gmail.com Guest

  7. #7

    Default Re: phpMyAdmin help

    [email]bradfordh[/email] wrote:
    > If I am using phpMyAdmin, how would I execute the command "mysql
    > --local-infile" ?
    >
    Please see my update to your previous question on this topic.

    --
    ==================
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    [email]jstucklexattglobal.net[/email]
    ==================
    Jerry Stuckle Guest

Similar Threads

  1. phpMyAdmin Can't create DBs HELP
    By ACAY in forum PHP Development
    Replies: 1
    Last Post: October 19th, 09:46 AM
  2. phpMyAdmin - how big is too big?
    By deko in forum MySQL
    Replies: 3
    Last Post: June 7th, 11:08 AM
  3. Help with phpMyAdmin
    By Gamespy007 in forum Macromedia Dynamic HTML
    Replies: 2
    Last Post: March 16th, 02:27 PM
  4. PHPMyAdmin
    By Didier Caamano in forum PHP Development
    Replies: 13
    Last Post: July 21st, 01:08 AM
  5. phpmyadmin - help please!
    By David Robley in forum PHP Development
    Replies: 0
    Last Post: July 7th, 10:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139