Professional Web Applications Themes

#39657 [NEW]: The extended table-specification "database.table" creates errors - PHP Bugs

From: w dot kaiser at fortune dot de Operating system: XP Pro PHP version: 4.4.4 PHP Bug Type: MySQL related Bug description: The extended table-specification "database.table" creates errors Description: ------------ The extended table-specification "database.table" im SQL-queries creates errors, if the the "database"-name contains a "-" (dash); The error is: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-olc.olc_configuration' at line 1" A sample statement is "select count(*) from db1021924-olc.olc_configuration" A connect to the database "db1021924-olc" is possible with PHP, but queries using the ...

  1. #1

    Default #39657 [NEW]: The extended table-specification "database.table" creates errors

    From: w dot kaiser at fortune dot de
    Operating system: XP Pro
    PHP version: 4.4.4
    PHP Bug Type: MySQL related
    Bug description: The extended table-specification "database.table" creates errors

    Description:
    ------------
    The extended table-specification "database.table" im SQL-queries creates
    errors, if the the "database"-name contains a "-" (dash);

    The error is:

    "You have an error in your SQL syntax; check the manual that corresponds
    to your MySQL server version for the right syntax to use near
    '-olc.olc_configuration' at line 1"

    A sample statement is "select count(*) from
    db1021924-olc.olc_configuration"

    A connect to the database "db1021924-olc" is possible with PHP, but
    queries using the the extended table-specifications fail!

    As we are using a "multi-db" approach in our application, and the ISP
    dictates this type of database-name syntax, this is a real show-stopper!

    A database-name like "db1021924_olc" (using the underscore instead of the
    dash) works fine!



    --
    Edit bug report at [url]http://bugs.php.net/?id=39657&edit=1[/url]
    --
    Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=39657&r=trysnapshot44[/url]
    Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=39657&r=trysnapshot52[/url]
    Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=39657&r=trysnapshot60[/url]
    Fixed in CVS: [url]http://bugs.php.net/fix.php?id=39657&r=fixedcvs[/url]
    Fixed in release: [url]http://bugs.php.net/fix.php?id=39657&r=alreadyfixed[/url]
    Need backtrace: [url]http://bugs.php.net/fix.php?id=39657&r=needtrace[/url]
    Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=39657&r=needscript[/url]
    Try newer version: [url]http://bugs.php.net/fix.php?id=39657&r=oldversion[/url]
    Not developer issue: [url]http://bugs.php.net/fix.php?id=39657&r=support[/url]
    Expected behavior: [url]http://bugs.php.net/fix.php?id=39657&r=notwrong[/url]
    Not enough info: [url]http://bugs.php.net/fix.php?id=39657&r=notenoughinfo[/url]
    Submitted twice: [url]http://bugs.php.net/fix.php?id=39657&r=submittedtwice[/url]
    register_globals: [url]http://bugs.php.net/fix.php?id=39657&r=globals[/url]
    PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=39657&r=php3[/url]
    Daylight Savings: [url]http://bugs.php.net/fix.php?id=39657&r=dst[/url]
    IIS Stability: [url]http://bugs.php.net/fix.php?id=39657&r=isapi[/url]
    Install GNU Sed: [url]http://bugs.php.net/fix.php?id=39657&r=gnused[/url]
    Floating point limitations: [url]http://bugs.php.net/fix.php?id=39657&r=float[/url]
    No Zend Extensions: [url]http://bugs.php.net/fix.php?id=39657&r=nozend[/url]
    MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=39657&r=mysqlcfg[/url]
    w dot kaiser at fortune dot de Guest

  2. #2

    Default #39657 [Opn->Bgs]: The extended table-specification "database.table" creates errors

    ID: 39657
    Updated by: [email]tony2001php.net[/email]
    Reported By: w dot kaiser at fortune dot de
    -Status: Open
    +Status: Bogus
    Bug Type: MySQL related
    Operating System: XP Pro
    PHP Version: 4.4.4
    New Comment:

    The error message comes from MySQL client, which means it's not PHP
    problem.


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-11-28 06:29:59] w dot kaiser at fortune dot de

    Forgot to mention, that MySQL itself can cope with this database-name,
    so it must bee a PHP-problem!

    ------------------------------------------------------------------------

    [2006-11-28 06:26:31] w dot kaiser at fortune dot de

    Description:
    ------------
    The extended table-specification "database.table" im SQL-queries
    creates errors, if the the "database"-name contains a "-" (dash);

    The error is:

    "You have an error in your SQL syntax; check the manual that
    corresponds to your MySQL server version for the right syntax to use
    near '-olc.olc_configuration' at line 1"

    A sample statement is "select count(*) from
    db1021924-olc.olc_configuration"

    A connect to the database "db1021924-olc" is possible with PHP, but
    queries using the the extended table-specifications fail!

    As we are using a "multi-db" approach in our application, and the ISP
    dictates this type of database-name syntax, this is a real
    show-stopper!

    A database-name like "db1021924_olc" (using the underscore instead of
    the dash) works fine!




    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=39657&edit=1[/url]
    tony2001@php.net Guest

  3. #3

    Default #39657 [Bgs]: The extended table-specification "database.table" creates errors

    ID: 39657
    User updated by: w dot kaiser at fortune dot de
    Reported By: w dot kaiser at fortune dot de
    Status: Bogus
    Bug Type: MySQL related
    Operating System: XP Pro
    PHP Version: 4.4.4
    New Comment:

    No, it is not!

    I first reported the bug to the MySQL-group, but they proofed to me,
    that MySQl handles the situation correctly!

    This is what they sent to me:

    ===============================================

    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 5 to server version: 5.0.27-community-nt

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> create database `db1021924-olc`;
    Query OK, 1 row affected (0.00 sec)

    mysql> use `db1021924-olc`;
    Database changed
    mysql> create table tb1 (id serial, col2 char(10));
    Query OK, 0 rows affected (0.13 sec)

    mysql> insert into tb1 (col2) values ("hello")
    -> ;
    Query OK, 1 row affected (0.03 sec)

    mysql> select * from `db1021924-olc`.tb1;
    +----+-------+
    | id | col2 |
    +----+-------+
    | 1 | hello |
    +----+-------+
    1 row in set (0.00 sec)


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-11-28 09:25:22] [email]tony2001php.net[/email]

    The error message comes from MySQL client, which means it's not PHP
    problem.

    ------------------------------------------------------------------------

    [2006-11-28 06:29:59] w dot kaiser at fortune dot de

    Forgot to mention, that MySQL itself can cope with this database-name,
    so it must bee a PHP-problem!

    ------------------------------------------------------------------------

    [2006-11-28 06:26:31] w dot kaiser at fortune dot de

    Description:
    ------------
    The extended table-specification "database.table" im SQL-queries
    creates errors, if the the "database"-name contains a "-" (dash);

    The error is:

    "You have an error in your SQL syntax; check the manual that
    corresponds to your MySQL server version for the right syntax to use
    near '-olc.olc_configuration' at line 1"

    A sample statement is "select count(*) from
    db1021924-olc.olc_configuration"

    A connect to the database "db1021924-olc" is possible with PHP, but
    queries using the the extended table-specifications fail!

    As we are using a "multi-db" approach in our application, and the ISP
    dictates this type of database-name syntax, this is a real
    show-stopper!

    A database-name like "db1021924_olc" (using the underscore instead of
    the dash) works fine!




    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=39657&edit=1[/url]
    w dot kaiser at fortune dot de Guest

  4. #4

    Default #39657 [Bgs]: The extended table-specification "database.table" creates errors

    ID: 39657
    Updated by: [email]derickphp.net[/email]
    Reported By: w dot kaiser at fortune dot de
    Status: Bogus
    Bug Type: MySQL related
    Operating System: XP Pro
    PHP Version: 4.4.4
    New Comment:

    select * from `db1021924-olc`.olc_configuration;
    vs.
    select count(*) from db1021924-olc.olc_configuration;

    Do you see the difference? Honestly, you're doing something wrong
    yourself. It is neither a PHP problem nor a MySQL problem.


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-11-28 09:30:02] w dot kaiser at fortune dot de

    No, it is not!

    I first reported the bug to the MySQL-group, but they proofed to me,
    that MySQl handles the situation correctly!

    This is what they sent to me:

    ===============================================

    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 5 to server version: 5.0.27-community-nt

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> create database `db1021924-olc`;
    Query OK, 1 row affected (0.00 sec)

    mysql> use `db1021924-olc`;
    Database changed
    mysql> create table tb1 (id serial, col2 char(10));
    Query OK, 0 rows affected (0.13 sec)

    mysql> insert into tb1 (col2) values ("hello")
    -> ;
    Query OK, 1 row affected (0.03 sec)

    mysql> select * from `db1021924-olc`.tb1;
    +----+-------+
    | id | col2 |
    +----+-------+
    | 1 | hello |
    +----+-------+
    1 row in set (0.00 sec)

    ------------------------------------------------------------------------

    [2006-11-28 09:25:22] [email]tony2001php.net[/email]

    The error message comes from MySQL client, which means it's not PHP
    problem.

    ------------------------------------------------------------------------

    [2006-11-28 06:29:59] w dot kaiser at fortune dot de

    Forgot to mention, that MySQL itself can cope with this database-name,
    so it must bee a PHP-problem!

    ------------------------------------------------------------------------

    [2006-11-28 06:26:31] w dot kaiser at fortune dot de

    Description:
    ------------
    The extended table-specification "database.table" im SQL-queries
    creates errors, if the the "database"-name contains a "-" (dash);

    The error is:

    "You have an error in your SQL syntax; check the manual that
    corresponds to your MySQL server version for the right syntax to use
    near '-olc.olc_configuration' at line 1"

    A sample statement is "select count(*) from
    db1021924-olc.olc_configuration"

    A connect to the database "db1021924-olc" is possible with PHP, but
    queries using the the extended table-specifications fail!

    As we are using a "multi-db" approach in our application, and the ISP
    dictates this type of database-name syntax, this is a real
    show-stopper!

    A database-name like "db1021924_olc" (using the underscore instead of
    the dash) works fine!




    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=39657&edit=1[/url]
    derick@php.net Guest

  5. #5

    Default #39657 [Bgs]: The extended table-specification "database.table" creates errors

    ID: 39657
    Updated by: [email]tony2001php.net[/email]
    Reported By: w dot kaiser at fortune dot de
    Status: Bogus
    Bug Type: MySQL related
    Operating System: XP Pro
    PHP Version: 4.4.4
    New Comment:

    1) select count(*) from db1021924-olc.olc_configuration
    2) select count(*) from `db1021924-olc`.tb1

    Don't you see the difference?


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-11-28 09:39:43] [email]derickphp.net[/email]

    select * from `db1021924-olc`.olc_configuration;
    vs.
    select count(*) from db1021924-olc.olc_configuration;

    Do you see the difference? Honestly, you're doing something wrong
    yourself. It is neither a PHP problem nor a MySQL problem.

    ------------------------------------------------------------------------

    [2006-11-28 09:30:02] w dot kaiser at fortune dot de

    No, it is not!

    I first reported the bug to the MySQL-group, but they proofed to me,
    that MySQl handles the situation correctly!

    This is what they sent to me:

    ===============================================

    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 5 to server version: 5.0.27-community-nt

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> create database `db1021924-olc`;
    Query OK, 1 row affected (0.00 sec)

    mysql> use `db1021924-olc`;
    Database changed
    mysql> create table tb1 (id serial, col2 char(10));
    Query OK, 0 rows affected (0.13 sec)

    mysql> insert into tb1 (col2) values ("hello")
    -> ;
    Query OK, 1 row affected (0.03 sec)

    mysql> select * from `db1021924-olc`.tb1;
    +----+-------+
    | id | col2 |
    +----+-------+
    | 1 | hello |
    +----+-------+
    1 row in set (0.00 sec)

    ------------------------------------------------------------------------

    [2006-11-28 09:25:22] [email]tony2001php.net[/email]

    The error message comes from MySQL client, which means it's not PHP
    problem.

    ------------------------------------------------------------------------

    [2006-11-28 06:29:59] w dot kaiser at fortune dot de

    Forgot to mention, that MySQL itself can cope with this database-name,
    so it must bee a PHP-problem!

    ------------------------------------------------------------------------

    [2006-11-28 06:26:31] w dot kaiser at fortune dot de

    Description:
    ------------
    The extended table-specification "database.table" im SQL-queries
    creates errors, if the the "database"-name contains a "-" (dash);

    The error is:

    "You have an error in your SQL syntax; check the manual that
    corresponds to your MySQL server version for the right syntax to use
    near '-olc.olc_configuration' at line 1"

    A sample statement is "select count(*) from
    db1021924-olc.olc_configuration"

    A connect to the database "db1021924-olc" is possible with PHP, but
    queries using the the extended table-specifications fail!

    As we are using a "multi-db" approach in our application, and the ISP
    dictates this type of database-name syntax, this is a real
    show-stopper!

    A database-name like "db1021924_olc" (using the underscore instead of
    the dash) works fine!




    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=39657&edit=1[/url]
    tony2001@php.net Guest

  6. #6

    Default #39657 [Bgs]: The extended table-specification "database.table" creates errors

    ID: 39657
    User updated by: w dot kaiser at fortune dot de
    Reported By: w dot kaiser at fortune dot de
    Status: Bogus
    Bug Type: MySQL related
    Operating System: XP Pro
    PHP Version: 4.4.4
    New Comment:

    Thanx for your effort!

    The "`" around the table name (`db1021924-olc`) does the trick!


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-11-28 09:41:09] [email]tony2001php.net[/email]

    1) select count(*) from db1021924-olc.olc_configuration
    2) select count(*) from `db1021924-olc`.tb1

    Don't you see the difference?

    ------------------------------------------------------------------------

    [2006-11-28 09:39:43] [email]derickphp.net[/email]

    select * from `db1021924-olc`.olc_configuration;
    vs.
    select count(*) from db1021924-olc.olc_configuration;

    Do you see the difference? Honestly, you're doing something wrong
    yourself. It is neither a PHP problem nor a MySQL problem.

    ------------------------------------------------------------------------

    [2006-11-28 09:30:02] w dot kaiser at fortune dot de

    No, it is not!

    I first reported the bug to the MySQL-group, but they proofed to me,
    that MySQl handles the situation correctly!

    This is what they sent to me:

    ===============================================

    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 5 to server version: 5.0.27-community-nt

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> create database `db1021924-olc`;
    Query OK, 1 row affected (0.00 sec)

    mysql> use `db1021924-olc`;
    Database changed
    mysql> create table tb1 (id serial, col2 char(10));
    Query OK, 0 rows affected (0.13 sec)

    mysql> insert into tb1 (col2) values ("hello")
    -> ;
    Query OK, 1 row affected (0.03 sec)

    mysql> select * from `db1021924-olc`.tb1;
    +----+-------+
    | id | col2 |
    +----+-------+
    | 1 | hello |
    +----+-------+
    1 row in set (0.00 sec)

    ------------------------------------------------------------------------

    [2006-11-28 09:25:22] [email]tony2001php.net[/email]

    The error message comes from MySQL client, which means it's not PHP
    problem.

    ------------------------------------------------------------------------

    [2006-11-28 06:29:59] w dot kaiser at fortune dot de

    Forgot to mention, that MySQL itself can cope with this database-name,
    so it must bee a PHP-problem!

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/39657[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=39657&edit=1[/url]
    w dot kaiser at fortune dot de Guest

Similar Threads

  1. Which Acrobat 9 product? Table of Contents & Index "jump" to page
    By Margie_Willensky@adobeforums.com in forum Adobe Acrobat Macintosh
    Replies: 2
    Last Post: July 24th, 07:08 PM
  2. #39657 [Opn]: The extended table-specification "database.table" creates errors
    By w dot kaiser at fortune dot de in forum PHP Bugs
    Replies: 0
    Last Post: November 28th, 06:29 AM
  3. Replies: 1
    Last Post: February 4th, 03:45 AM
  4. Replies: 5
    Last Post: September 9th, 12:42 PM
  5. Replies: 3
    Last Post: July 17th, 01:13 PM

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