RE: [PHP-DB] List menus

2006-12-05 Thread Vincent DUPONT
Hello,

there is a very good menu to do this : see PEAR html_menu
(see http://pear.php.net, search for package HTML_Menu)

this has various menu types. One is the 'tree' (vertical list), the other is 
the 'urhere', which will display the 'You are in:...' menu.

I guess this is mhat you need.
This works very well as long as you have a distinct URL for every menu item, 
which is usually the case.
I guess there is a PEAR::DB wrapper that will let you connect and fetch the 
data from a database. I did my own menu class to fetch my own menu data and 
display of using the HTML_Menu.

A good point is also the 'renderers' wich let you create new layouts for the 
very same menu data. this will help you create special menus for your 
customers...

Vincent


-Original Message- 
From: David Skyers [mailto:[EMAIL PROTECTED]
Sent: Tue 5/12/2006 14:19
To: php-db@lists.php.net
Subject: [PHP-DB] List menus
 
Hello,

How do you create a database driven list menu, and record the options
that a user has chosen. And then display the list menu with those chosen
option selected.

 Please select from list  >PHP 3  ---  >PHP 4  >PHP
5
 

Regards,

 
David

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Special Character

2006-11-23 Thread Vincent DUPONT
Hi,

You can maybe have a problem between a UTF-8 webserver and a ASCII (latin  or 
whatever) database?
Do you know the default_charset of your webserver (check the php.ini) and do 
you know the charset of your database? and the charset of your oracle client ? 
all 3 will play a role...

this : 'De l'Bge du fer au haut Moyen Bge.' really looks like inserting a 
UTF/unicode char into a ascii (latin, ...) database...


I think the best solution would be to keep the htmlentities to store the chars 
into the database, no?
this way would ensure you insert only 'simple' chars, at least as long as you 
do not enter chinese or foreign chars in your website.

vincent



-Original Message-
From: David Skyers [mailto:[EMAIL PROTECTED]
Sent: Thu 23/11/2006 10:29
To: Chris
Cc: php-db@lists.php.net
Subject: RE: [PHP-DB] Special Character
 
Hi Chris,

Yes, I was using htmlentities, I have now removed that and now 

'De l'Âge du fer au haut Moyen Âge.'

gets inserted into oracle as
 
'De l'Bge du fer au haut Moyen Bge.'  

Any ideas?

David
-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: 22 November 2006 21:17
To: David Skyers
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] Special Character

David Skyers wrote:
> Hi Kevin,
>  
> Thanks for this, it got rid of my special characters. However I now have a 
> problem with foreign characters.
>  
> Example
>  
> 'De l'Âge du fer au haut Moyen Âge.' 
>  
> gets inserted into oracle as
>  
> De l'Âge du fer au haut Moyen Âge.
>  
> I have an oracle procedure that inserts the data, if I run the oracle 
> procedure directly in oracle it inserts the special characters okay. The 
> problem seems to be with the way php execute the procedure.

Are you calling htmlentities or htmlspecialchars before calling the procedure? 
That looks like what's happening.

--
Postgresql & php tutorials
http://www.designmagick.com/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Special Character

2006-11-22 Thread Vincent DUPONT

I you use a SQL adapter, like ADO, it could do the htmlentities it self...

However, if you would like to change this, note that oracle will consider some 
chars as 'special chars', like (if I remember well) the &.
To be able to insert a string with these chars, you need to search/replace them 
by their ascii value (use the Oracle function chr()
This is specially true when inserting urls.

vincent


-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Wed 22/11/2006 22:17
To: David Skyers
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] Special Character
 
David Skyers wrote:
> Hi Kevin,
>  
> Thanks for this, it got rid of my special characters. However I now have a 
> problem with foreign characters.
>  
> Example 
>  
> 'De l'Âge du fer au haut Moyen Âge.' 
>  
> gets inserted into oracle as 
>  
> De l'Âge du fer au haut Moyen Âge.
>  
> I have an oracle procedure that inserts the data, if I run the oracle 
> procedure directly in oracle it inserts the special characters okay. The 
> problem seems to be with the way php execute the procedure.

Are you calling htmlentities or htmlspecialchars before calling the 
procedure? That looks like what's happening.

-- 
Postgresql & php tutorials
http://www.designmagick.com/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Problem with insert BLOB into Oracle

2006-10-05 Thread Vincent DUPONT
Hello
 you can not insert a lob this way.
Refer to the php manual pages at http://www.php.net/oci
And search for Example 3. Inserting data into a CLOB column

Vincent


-Original Message-
From: Rosen [mailto:[EMAIL PROTECTED] 
Sent: jeudi 5 octobre 2006 14:43
To: php-db@lists.php.net
Subject: [PHP-DB] Problem with insert BLOB into Oracle


Hi,
I have problem with inserting into BLOB field in Oracle 10:


insert into some_table(DESC) values ( '$txt')


The DESC field type is "LONG RAW"
The $txt variable contains large text, whitch is extracted from another
table field with same type.

When I read field DESC and print it, there is no problems, but when try
to insert I receive an error:"Error: ORA-01465: invalid hex number"

Can someone help ?

Thanks,
Rosen

--
PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php