Your input and stored data need to agree in character set.  Make sure
either that you are displaying the page to the user in a hebrew
character set (so that input will be sent back in same charset) or as
was already suggested, switch everything over to utf8.


You can do this either by using


    *header*('Content-Type: text/html; *charset*=utf-8');  [or iso8859-8
or iso8859-9-i]

    (anywhere in your script before output starts)


or by likewise including the following in your page <head> section


    <*meta http*-equiv="Content-Type"
content="text/html;*charset*=utf-8" />   [or iso8859-8 or iso8859-9-i]


You can also try something like: (look these up in the manual for more
details)


SET CHARACTER SET hebrew (or utf8)

SET NAMES hebrew (or utf8)


as you log in to the database, or use the CONVERT function in your
individual statements.


Gadi


David Suna wrote:

> While this is not directly linux related it is FOSS related.
>
>
> I have a MySQL 5 database that has fields with Hebrew values.  The
> fields are defined as varchar with a hebrew_general_ci collation.  I
> have a PHP page that takes values specified in a form field and runs a
> query against the table.  For example, it takes the values specified
> by the user for first name and last name and queries the table for
> rows that match the first_name and last_name columns.  When I run the
> query on the PHP page the result is that no rows are found.  When I
> print out the SQL that was run and copy and paste it into a query on
> phpMyAdmin against the same database it does return rows in the result
> set.
>
>
> Does someone know the magic necessary to make the query work when it
> is run via PHP?  Alternatively, how can I debug this problem where the
> printed SQL works when run through phpMyAdmin but not when run directly?
>
>
> Thanks,
>


-- 
Gadi Cohen aka Kinslayer <[EMAIL PROTECTED]> www.wastelands.net
Freelance admin/coding/design HABONIM DROR linux/fantasy enthusiast
KeyID 0x93F26EF5: 256A 1FC7 AA2B 6A8F 1D9B 6A5A 4403 F34B 93F2 6EF5


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to