Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Location
    Greece
    Posts
    22
    Plugin Contributions
    0

    Default Sending a MySQL SET command via PHP from ZC code

    Hi,

    I'd like to send a SET NAMES command to MySQL prior to the mysql_connect and mysql_select_db commands in the ZC code at includes/classes/db/mysql/query_factory.php. Is that possible? I could find no mention in the PHP cocumentation I searched.

    The MySQL SET statement (of which the syntax I copy below) is one of the approaches we're working on to get full iso8859-7 compatibility for our soon-to-be Greek

    Thanks,

    Nikolas



    -----------------------------------
    SET
    #
    NAMES {'charset_name' [COLLATE 'collation_name'} | DEFAULT}

    SET NAMES sets the three session system variables character_set_client, character_set_connection, and character_set_results to the given character set. Setting character_set_connection to charset_name also sets collation_connection to the default collation for charset_name. The optional COLLATE clause may be used to specify a collation explicitly. See Section 10.4, “Connection Character Sets and Collations”.

    The default mapping can be restored by using a value of DEFAULT. The default depends on the server configuration.

    Note that the syntax for SET NAMES differs from that for setting most other options. This statement is available as of MySQL 4.1.0.
    ------------------------------------------------

    I'd like to locate the point(s) in the ZC code where the php command to connect to the store db is given. I unserstood that the relevant php commands I should look for would be

    mysql_connect
    mysql_select_db

    Usind Developer's Tool Kit in Admin I searched foe these two but came up with nothing.

  2. #2
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: Sending a MySQL SET command via PHP from ZC code

    I believe that the connection is made in the application_top.php
    Zen cart PCI compliant Hosting

  3. #3
    Join Date
    Mar 2006
    Location
    Greece
    Posts
    22
    Plugin Contributions
    0

    Default Re: Sending a MySQL SET command via PHP from ZC code

    The mysql_connect & mysql_select_db commands only appear in query_factory.php. The issue appears to be IF PHP can accomodate the passing of the SET statement to MySQL.

    You're never too far away, are you Tony? :)
    What will the wife say? :))

  4. #4
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: Sending a MySQL SET command via PHP from ZC code

    Shes working a Double today she wont be home till about 11PM.

    I am still trying to figure this out, I cant for the life of me get the character set for the server to be utf8.
    If I get this set then you will be OK.
    Zen cart PCI compliant Hosting

  5. #5
    Join Date
    Mar 2006
    Location
    Greece
    Posts
    22
    Plugin Contributions
    0

    Default Re: Sending a MySQL SET command via PHP from ZC code

    everything i've heard shows that utf8 is not the answer, at least in my case. iso8859-7 is what I'd want to have all around

  6. #6
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: Sending a MySQL SET command via PHP from ZC code

    the information is stored in the database correctly,
    however the character set for server is Latin,
    I have verified that if I set that to utf8 that it will display your language correctly,
    Zen cart PCI compliant Hosting

 

 

Similar Threads

  1. v153 subscribe and unsubscribe from email via zen_mail code
    By rebecca_L in forum General Questions
    Replies: 1
    Last Post: 2 Jun 2015, 03:08 AM
  2. Import Customers From CSV Via MySql?
    By suntower in forum Managing Customers and Orders
    Replies: 6
    Last Post: 15 Jun 2011, 06:54 AM
  3. php email not sending out with correct character set
    By mahalo in forum General Questions
    Replies: 5
    Last Post: 10 Jun 2007, 03:47 PM
  4. Set File Permissions from Command Line Help
    By Picci in forum General Questions
    Replies: 1
    Last Post: 20 Jan 2007, 03:00 PM

Posting Permissions

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