Re: [PHP-DB] multi-language site
Mensaje citado por Muhammed Mamedov <[EMAIL PROTECTED]>: > Thank you for your comments Ignatius. > (just to note) : I do not agree that all projects SHOULD require CLEAR > sepeartion of code and appearance. Let me disagree with you! :-) I a multi-tiered design yuo have a client layer, a server layer (this should be the PHP pages on the server), and the database layer (simply for storage). Now, the server layer is easier to maintain if you have it devided in a buissness layer and a presentation layer. The presentation layer should have programs that print the results. Now, to make it even easier to maintain your code, abstraction of HTML code from the PHP code is the best way to go. It make the PHP more readable, and the HTML easy to edit by non programmers. > Further on this issue: > Consider that there are lots of dynamic stuff like "news", and there are > thousands of users and all data is stored in a database. Currently data is > stored as a simple text. And I want to provide users (or their graphic > editors) to display these "news" on their page in the way they like. So, to > achieve this task I need a nice seperation of code and design. We may not > achieve a 100% seperate work, but at least a graphical designer (who doesn't > know any PHP) has to be able to develop a new design for his customers (our > user) with ease. I think you should point to HTML_Template_IT (pear.php.net) -- select 'mmarques' || '@' || 'unl.edu.ar' AS email; - Martín Marqués | Programador, DBA Centro de Telemática| Administrador Universidad Nacional del Litoral - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: Subselect ?
Mensaje citado por Christine Clerc <[EMAIL PROTECTED]>: > Well, I had tried this : > SELECT DISTINCT id_script FROM readme WHERE id_language = $languageorignin; > But then I have to do this with the selection : > SELECT DISTINCT id_script FROM readme WHERE id_language != $languagetarget; > but it cannot work since I get back the id_script from the first selection ! > > See a sample of the table : > > id_readme, id_script, id-language > 1, 2, 4 > 2, 3, 1 > 3, 3, 4 > 4, 4, 4 > > All the scripts are in english, but one has been already translated > into French. > > I want to say to the translator that works from english to french, > 1) you have script 2 and 4 to translate > 2) you can rewrite the translation of script 3 (this second question > I have manage with creating a temporary table). > > I don't think the newest version of mysql will be on the server. I think the problem was the selection of the database server. If you need special features like sub-select you shouldn't have chossen MySQL. By the way, I think it may be posible to build a query that does what you want, but it would involve UNION and lots of quiery work. -- select 'mmarques' || '@' || 'unl.edu.ar' AS email; - Martín Marqués | Programador, DBA Centro de Telemática| Administrador Universidad Nacional del Litoral - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Unsubscribe User Fabio Farinelli - Headers Needed
Richard Hutchins wrote: PHP-List-Admin, Every time a user posts to the php-db list, the message below is automatically sent to the sender. This has been a problem for many months now and frequently sparks multiple requests from frustrated users to have [EMAIL PROTECTED] removed from the list. Can you please remove the user from the list? I do not have the headers for this particular e-mail, but am copying the list in hopes that someone WILL have the original headers and can attach them to this mail and forward it along. (message appears below) Subject: L'utente Fabio Farinelli ha cambiato indirizzo di posta elettronica. Il nuovo indirizzo è: [EMAIL PROTECTED] La mail è stata comunque inoltrata entro 60 minuti al nuovo indirizzo di posta. Si consiglia sin da subito l'utilizzo del nuovo indirizzo; a breve il vecchio indirizzo verrà inattivato. Questa è una mail di servizio. NON rispondere. Here's the headers I got from the return e-mail: From [EMAIL PROTECTED] Fri Jan 16 08:37:08 2004 Return-Path: <[EMAIL PROTECTED]> Delivered-To: [EMAIL PROTECTED] Received: (qmail 18100 invoked from network); 16 Jan 2004 08:37:08 -0800 Received: from smtp.easydns.com (HELO carnage.easydns.com) (216.220.40.247) by c-24-5-55-230.client.comcast.net with SMTP; 16 Jan 2004 08:37:08 -0800 Received: from www.asl.pavia.it (www.asl.pavia.it [212.210.13.254]) by carnage.easydns.com (Postfix) with ESMTP id EF2B14CA96 for <[EMAIL PROTECTED]>; Fri, 16 Jan 2004 11:55:13 -0500 (EST) Subject: L'utente Fabio Farinelli ha cambiato indirizzo di posta elettronica. Sender: [EMAIL PROTECTED] To: Justin Patrin <[EMAIL PROTECTED]> Message-ID: <[EMAIL PROTECTED]> Date: Fri, 16 Jan 2004 17:45:18 +0100 X-MIMETrack: Serialize by Router on SRVINT/ASLPavia(Release 5.0.12 |February 13, 2003) at 01/16/2004 05:42:54 PM MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable From: [EMAIL PROTECTED] X-Spambayes-Classification: spam; 1.00 -- paperCrane -- Question Everything, Reject Nothing -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Subject: MySQL general Question...
There is no difference, in the way you wrote it. However, if you used wildcards you could match as follows : SELECT & FROM my_table WHERE 'email' LIKE '[EMAIL PROTECTED]' // Match all addresses at hotmail.com SELECT & FROM my_table WHERE 'email' LIKE '[EMAIL PROTECTED]' // Match all user names beginning with 123@ SELECT & FROM my_table WHERE 'email' LIKE '[EMAIL PROTECTED]' // Match all users having email address beginning 12 [0-9,a-z, any other character] @ hotmail.com SELECT & FROM my_table WHERE 'email' LIKE '[EMAIL PROTECTED]' // Match all users at hotmail.com, hotmail.net, hotmail.biz but *not* hotmail.info // because ___ (3 underscores) matches any 3 characters but not any 4 characters. Cheers - Neil. At 14:45 16/01/2004 +, you wrote: To: [EMAIL PROTECTED] MIME-Version: 1.0 Message-ID: <[EMAIL PROTECTED]> From: [EMAIL PROTECTED] Date: Fri, 16 Jan 2004 14:39:59 + Content-Type: multipart/alternative; boundary="=_alternative 0050D81280256E1D_=" Subject: MySQL general Question... What's teh diffence between 'LIKE' & '=' EG: SELECT & FROM my_table WHERE 'email' LIKE '[EMAIL PROTECTED]' I've just purchased an E-mail marketing piece of software, and was peakign in the code... Found that... Never seen it before (Have I been living in a box?) Cheers, Tris... CaptionKit http://www.captionkit.com : Production tools for accessible subtitled internet media, transcripts and searchable video. Supports Real Player, Quicktime and Windows Media Player. VideoChat with friends online, get Freshly Toasted every day at http://www.fresh-toast.net : NetMeeting solutions for a connected world. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] PHP 4.3.4, ADODB and Oracle9.2
Hi, I have a question if the following combination will work. Win 2K server IIS 4.0 PHP 4.3.4 ADODB 4.10 Oracle 9.2 I got the following error Warning: ociplogon():_oci_open_server: Error while trying to retrieve text for error ORA-12538 in C:\PHPRoot\ADODB\drivers\adodb-oci8.inc.php on line 128 Fatal error: Call to a member function on a non-object in C:\inetpub\wwwroot\PHP\flximage0.php on line 36 Any idea if adodb-oci8.inc.php will work on Oracle 9.2 database? William Cheung B.Sc, MCSE, MCDBA Databyte Corp. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.560 / Virus Database: 352 - Release Date: 1/08/2004
RE: [PHP-DB] Re: PHP4.2.3 and Oracle 9.2
I finally found out it is related to the permission of Oracle folder. After making "Everyone" to have full control to the folder, the ODBC connection works. William Cheung B.Sc, MCSE, MCDBA Databyte Corp. -Original Message- From: Justin Patrin [mailto:[EMAIL PROTECTED] Sent: January 15, 2004 11:53 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: PHP4.2.3 and Oracle 9.2 > Error display on browser: > > Warning: SQL error: Specified driver could not be loaded due to system > error 5 (Oracle in OraHome92)., SQL state IM003 in SQL Connect in > c:\inetpub\wwwroot\PHP\testora.php on line 2. > > Warning: odbc_exec(): Supplied argument is not a valid ODBC-Link > resource in c:\inetpub\wwwroot\PHP\testora.php on line 5 > > Warning: odbc_fetch_into(): Supplied argument is not a valid ODBC result > resource in c:\inetpub\wwwroot\PHP\testora.php on line 6 > > Warning: odbc_close(): Supplied argument is not a valid ODBC-Link > resource in c:\inetpub\wwwroot\PHP\testora.php on line 14 > If you're using seperate PHP compilations for command-line and Apache (ie. a php binary for CLI and mod_php for apache) then it is likely that the same things were not compiled into both. Of course, since this is ODBC, it seems unlikely that this is the problem. It's probably some kind of ODBC configuration issue. Check the documentation for ODBC on Linux and make sure that the web version of PHP has the correct settings (use phpinfo()). -- paperCrane -- Question Everything, Reject Nothing -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.560 / Virus Database: 352 - Release Date: 1/08/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.560 / Virus Database: 352 - Release Date: 1/08/2004 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Unsubscribe User Fabio Farinelli - Headers Needed
PHP-List-Admin, Every time a user posts to the php-db list, the message below is automatically sent to the sender. This has been a problem for many months now and frequently sparks multiple requests from frustrated users to have [EMAIL PROTECTED] removed from the list. Can you please remove the user from the list? I do not have the headers for this particular e-mail, but am copying the list in hopes that someone WILL have the original headers and can attach them to this mail and forward it along. (message appears below) Subject: L'utente Fabio Farinelli ha cambiato indirizzo di posta elettronica. Il nuovo indirizzo è: [EMAIL PROTECTED] La mail è stata comunque inoltrata entro 60 minuti al nuovo indirizzo di posta. Si consiglia sin da subito l'utilizzo del nuovo indirizzo; a breve il vecchio indirizzo verrà inattivato. Questa è una mail di servizio. NON rispondere. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: L'utente Fabio Farinelli ha cambiato indirizzo di posta elettronica.
Hi, all -- ...and then Justin Patrin said... % % Ignatius Reilly wrote: % % >Somebody with admin rights to this list please castrate this Farinelli % >user. % % +1 on that! for(;;++); :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
Re: [PHP-DB] Re: Subselect ?
Well, I had tried this : SELECT DISTINCT id_script FROM readme WHERE id_language = $languageorignin; But then I have to do this with the selection : SELECT DISTINCT id_script FROM readme WHERE id_language != $languagetarget; but it cannot work since I get back the id_script from the first selection ! See a sample of the table : id_readme, id_script, id-language 1, 2, 4 2, 3, 1 3, 3, 4 4, 4, 4 All the scripts are in english, but one has been already translated into French. I want to say to the translator that works from english to french, 1) you have script 2 and 4 to translate 2) you can rewrite the translation of script 3 (this second question I have manage with creating a temporary table). I don't think the newest version of mysql will be on the server. Thank you Christine try this SELECT DISTINCT id-script FROM YOURTABLE where id_language = 'SELECTED LANGUAGE' ; no ? Justin Patrin wrote: Christine Clerc wrote: Hi, I have a Mysql table of texts in different languages : id_readme id_script (the object that the text describes) id_language (the language the text is written in) etc. So two texts may have the same id_script but with different id_language. I need to retrieve the list (without duplicate) of id-script that are described in one language and NOT in another. Is there hope ? Any help would be welcome. Chris Maybe give us a sample of the SQL you wish to use? You can probably get it done without a sub-select. That being said, the newest versions of MySQL support sub-selects, but you'd have to use an unstable version. -- Alban Médici R&D software engineer -- you can contact me @ : [EMAIL PROTECTED] http://www.netcentrex.net -- -- 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] Re: Subselect ?
try this SELECT DISTINCT id-script FROM YOURTABLE where id_language = 'SELECTED LANGUAGE' ; no ? Justin Patrin wrote: Christine Clerc wrote: Hi, I have a Mysql table of texts in different languages : id_readme id_script (the object that the text describes) id_language (the language the text is written in) etc. So two texts may have the same id_script but with different id_language. I need to retrieve the list (without duplicate) of id-script that are described in one language and NOT in another. Is there hope ? Any help would be welcome. Chris Maybe give us a sample of the SQL you wish to use? You can probably get it done without a sub-select. That being said, the newest versions of MySQL support sub-selects, but you'd have to use an unstable version. -- Alban Médici R&D software engineer -- you can contact me @ : [EMAIL PROTECTED] http://www.netcentrex.net -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: PHP4.2.3 and Oracle 9.2
Sorry but I am not using Linux and Apache and also I didn't compile the source myself. My system is a Win2K server running IIS 4.0. I have just upgrade it to PHP 4.3.4 but it doesn't help. The test script has been used for Oracle 8i without problem. I have test the ODBC connection and also the command line and both works fine. I have used php.exe and php4isapi.dll in the web server and both return the same error. William Cheung B.Sc, MCSE, MCDBA Databyte Corp. -Original Message- From: Justin Patrin [mailto:[EMAIL PROTECTED] Sent: January 15, 2004 11:53 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: PHP4.2.3 and Oracle 9.2 > Error display on browser: > > Warning: SQL error: Specified driver could not be loaded due to system > error 5 (Oracle in OraHome92)., SQL state IM003 in SQL Connect in > c:\inetpub\wwwroot\PHP\testora.php on line 2. > > Warning: odbc_exec(): Supplied argument is not a valid ODBC-Link > resource in c:\inetpub\wwwroot\PHP\testora.php on line 5 > > Warning: odbc_fetch_into(): Supplied argument is not a valid ODBC result > resource in c:\inetpub\wwwroot\PHP\testora.php on line 6 > > Warning: odbc_close(): Supplied argument is not a valid ODBC-Link > resource in c:\inetpub\wwwroot\PHP\testora.php on line 14 > If you're using seperate PHP compilations for command-line and Apache (ie. a php binary for CLI and mod_php for apache) then it is likely that the same things were not compiled into both. Of course, since this is ODBC, it seems unlikely that this is the problem. It's probably some kind of ODBC configuration issue. Check the documentation for ODBC on Linux and make sure that the web version of PHP has the correct settings (use phpinfo()). -- paperCrane -- Question Everything, Reject Nothing -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.560 / Virus Database: 352 - Release Date: 1/08/2004 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Fw: informix problem
i have winnt 4.0 servicepack 6 + apache 2.0.47 + php 430 + informix client for nt ilogin demo works fine sql editor works fine but when i try to connect to informix via php i'get an error like Warning: ifx_connect(): E [SQLSTATE=S1 001 SQLCODE=-406] i have informix server 2000 installed on other (unix) machine. i have 256MB memory and 20 GB hard (6GB free) what should i do? Bogdan IncrediMail - Email has finally evolved - Click Here
[PHP-DB] Re: passing a $_POST variable
[EMAIL PROTECTED] wrote: Good day all, This may be easier than I'm imagining... The question: When using the header(location: ...) method for inserting or updating some $_POST['variable']'s into a MySQL db (preventing repeat insertions or updates when 'refreshing', etc...), is it possible to return a $_POST['variable'] from the page that does the insert? I'm imagining that I'd have to have a form on the insert page with a hidden field to hold the values(s). But using this line of reasoning, I'm stuck at how the form would be submitted. Maybe I'm missing something, but if you want to show the updated info for that computer, why not just pull the updated data fromt he DB, just as you must be when you initially create the page? If that's not what you meant, why not do the insert and such, then display the page without using header()? Or, if there is an error, display the error, use the current $_POST entries to fill out the form again, then on a sucessful post, insert, then refresh. -- paperCrane -- Question Everything, Reject Nothing -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Subselect ?
Christine Clerc wrote: Hi, I have a Mysql table of texts in different languages : id_readme id_script (the object that the text describes) id_language (the language the text is written in) etc. So two texts may have the same id_script but with different id_language. I need to retrieve the list (without duplicate) of id-script that are described in one language and NOT in another. Is there hope ? Any help would be welcome. Chris Maybe give us a sample of the SQL you wish to use? You can probably get it done without a sub-select. That being said, the newest versions of MySQL support sub-selects, but you'd have to use an unstable version. -- paperCrane -- Question Everything, Reject Nothing -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] multi-language site
The same can be achieved in a much simpler way with Gettext! With gettext, you send a file to your translator, and receive the same file completed. Period. Instead of logging to a DB, the translator simply creates string translations with a user-friendly editor, such as the excellent POEdit (http://poedit.sourceforge.net) for Windows. Takes a dummy 2 minutes to understand how it works. I guarantee that with this method you will translate 500 strings in less than a day. In contrast, updating DB records one by one is much longer: requires a broadband connection, no cut-and-paste available (believe me, there is a lot of such!) Also, later updating your DB concurrently will be a nightmare. With Gettext, you simply regenerate the master file (eg English) from the application and send the language files to the translator(s). The few strings that are not yet translated will appear nicely in their editor. HTH Ignatius _ - Original Message - From: "Dan Hewins" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]@[EMAIL PROTECTED]> Sent: Friday, January 16, 2004 16:28 Subject: Re: [PHP-DB] multi-language site > This is true. And another aspect I forgot to mention is an admin > version of the whole site because the user wants to be able to update > and change text in either the English or Spanish site. This way I only > have to build (design, code HTML) the site once and then I essentially > have four different sites (English, Spanish, Admin-Eng, Admin-Esp). > > A separate question is this: where are the good resources for XML on > the web? > > Thanks. > > Dan > > > On Jan 16, 2004, at 4:18 AM, <[EMAIL PROTECTED]> wrote: > > > The advantage of doing it the way Dan describes is that it is > > very easy to set up an admin tool for the person doing the translating. > > Dan can fill up the English half of the db, and then write a > > page that queries the db for any empty Spanish entries, displays > > them in a select box, and allows the translator to enter the > > Spanish text in to the db. This way, when new English text is > > added, all the translator has to do is check the page, the new > > phrases will automatically be displyed. > > > > The translator doesn't need any knowledge of HTML, and doesn't > > need to involve any other person to upload the text. > > > > Maybe this can be done with XML as well, I don't know. But we > > recently used this system for a English/French site I worked > > on and it worked very well. > > > > -Lisi > > > > = = = Original message = = = > > > > Forgive me if this is pedestrian or has been covered before. > > I'm new > > to the list and I haven't used PHP too much (yet). > > > > Here's my question: > > > > I'm looking to use PHP for an upcoming site project where the > > site > > needs to be in either English or Spanish. Would PHP be a good > > approach? > > I was envisioning having a database with every text bit and image > > with > > text in it in two columns, one for English, and one for Spanish. > > Then > > each web page would reference some kind of global variable (a > > cookie?) > > to determine whether to pull the images and text from the English > > > > column or the Spanish column. Does this sound like a good approach? > > Is > > PHP capable of something like this? > > > > Thanks for any help or suggestions you can give. > > > > Dan Hewins > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > ___ > > Sent by ePrompter, the premier email notification software. > > Free download at http://www.ePrompter.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
[PHP-DB] passing a $_POST variable
Good day all, This may be easier than I'm imagining... The question: When using the header(location: ...) method for inserting or updating some $_POST['variable']'s into a MySQL db (preventing repeat insertions or updates when 'refreshing', etc...), is it possible to return a $_POST['variable'] from the page that does the insert? I'm imagining that I'd have to have a form on the insert page with a hidden field to hold the values(s). But using this line of reasoning, I'm stuck at how the form would be submitted. Here's a longer description of the issue: The main page has 24 radio buttons related to computers on a network. When the page is initially displayed, none of these are selected. When a button is clicked, information about the selected computer, such as location, IP address, MAC, user(s), date of purchase, manufacturer, software installed, time and date of update, etc..., is displayed in one column, and in a second column, one has the option to enter new values for these items. So a user updates the record for the computer, enters username and password, hits submit, and the data gets sent in the $_POST array to a second page that does the insert, then redirects back to the main page (I know how to do all this stuff). What I'd like is for the main page to display the newly updated data for the just selected computer, along with info for the user related to the update ( succeeded, failed due to wrong password, etc..). I know I could use $_SESSION or $_GET variables for this stuff, but I'm hoping I can use the $_POST array. Thank you for taking the time to read this question, and for any thoughts you might have about it. David
Re: [PHP-DB] multi-language site
This is true. And another aspect I forgot to mention is an admin version of the whole site because the user wants to be able to update and change text in either the English or Spanish site. This way I only have to build (design, code HTML) the site once and then I essentially have four different sites (English, Spanish, Admin-Eng, Admin-Esp). A separate question is this: where are the good resources for XML on the web? Thanks. Dan On Jan 16, 2004, at 4:18 AM, <[EMAIL PROTECTED]> wrote: The advantage of doing it the way Dan describes is that it is very easy to set up an admin tool for the person doing the translating. Dan can fill up the English half of the db, and then write a page that queries the db for any empty Spanish entries, displays them in a select box, and allows the translator to enter the Spanish text in to the db. This way, when new English text is added, all the translator has to do is check the page, the new phrases will automatically be displyed. The translator doesn't need any knowledge of HTML, and doesn't need to involve any other person to upload the text. Maybe this can be done with XML as well, I don't know. But we recently used this system for a English/French site I worked on and it worked very well. -Lisi = = = Original message = = = Forgive me if this is pedestrian or has been covered before. I'm new to the list and I haven't used PHP too much (yet). Here's my question: I'm looking to use PHP for an upcoming site project where the site needs to be in either English or Spanish. Would PHP be a good approach? I was envisioning having a database with every text bit and image with text in it in two columns, one for English, and one for Spanish. Then each web page would reference some kind of global variable (a cookie?) to determine whether to pull the images and text from the English column or the Spanish column. Does this sound like a good approach? Is PHP capable of something like this? Thanks for any help or suggestions you can give. Dan Hewins -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] MySQL general Question...
[EMAIL PROTECTED] wrote: What's teh diffence between 'LIKE' & '=' EG: SELECT & FROM my_table WHERE 'email' LIKE '[EMAIL PROTECTED]' = is an equality (case insensitive). LIKE allows you to use the % character as a wildcard (will match any amount of characters) and the _ character as a wildcard to match a single character. In your example, LIKE is being used ineffeciently. (Have I been living in a box?) Yes? ;) -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] MySQL general Question...
Standard SQL for comparing strings is LIKE '=' in lieu of 'LIKE' is a MySQL extension to SQL, therefore non-standard. Ignatius _ - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 16, 2004 15:39 Subject: [PHP-DB] MySQL general Question... > What's teh diffence between 'LIKE' & '=' > EG: SELECT & FROM my_table WHERE 'email' LIKE '[EMAIL PROTECTED]' > > I've just purchased an E-mail marketing piece of software, and was peakign > in the code... > Found that... Never seen it before (Have I been living in a box?) > > Cheers, > Tris... > > * > The information contained in this e-mail message is intended only for > the personal and confidential use of the recipient(s) named above. > If the reader of this message is not the intended recipient or an agent > responsible for delivering it to the intended recipient, you are hereby > notified that you have received this document in error and that any > review, dissemination, distribution, or copying of this message is > strictly prohibited. If you have received this communication in error, > please notify us immediately by e-mail, and delete the original message. > *** > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] MySQL general Question...
with the like command you could made search such as : SELECT & FROM my_table WHERE 'email' LIKE '[EMAIL PROTECTED]' and you could have several answer. = is for scrict equality [EMAIL PROTECTED] wrote: What's teh diffence between 'LIKE' & '=' EG: SELECT & FROM my_table WHERE 'email' LIKE '[EMAIL PROTECTED]' I've just purchased an E-mail marketing piece of software, and was peakign in the code... Found that... Never seen it before (Have I been living in a box?) Cheers, Tris... * The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. *** -- Alban Médici R&D software engineer -- [EMAIL PROTECTED] http://www.netcentrex.net -- -- Alban Médici R&D software engineer -- you can contact me @ : IPPhone : +33 (0)2 31 46 37 68 [EMAIL PROTECTED] http://www.netcentrex.net -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] MySQL general Question...
What's teh diffence between 'LIKE' & '=' EG: SELECT & FROM my_table WHERE 'email' LIKE '[EMAIL PROTECTED]' I've just purchased an E-mail marketing piece of software, and was peakign in the code... Found that... Never seen it before (Have I been living in a box?) Cheers, Tris... * The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. ***
Re: [PHP-DB] multi-language site
Usually it is the other way round: to assemble a page, a script will call successively several XSLT transformations: eg top, left nav bar, central content, footer... Each XSLT call returns HTML from content stored in XML. Ignatius > > I also wonder if XSLT can accept any php code? > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] multi-language site
Thank you for your comments Ignatius. (just to note) : I do not agree that all projects SHOULD require CLEAR sepeartion of code and appearance. Further on this issue: Consider that there are lots of dynamic stuff like "news", and there are thousands of users and all data is stored in a database. Currently data is stored as a simple text. And I want to provide users (or their graphic editors) to display these "news" on their page in the way they like. So, to achieve this task I need a nice seperation of code and design. We may not achieve a 100% seperate work, but at least a graphical designer (who doesn't know any PHP) has to be able to develop a new design for his customers (our user) with ease. I also wonder if XSLT can accept any php code? Any suggestions? M.Mamedov. - Original Message - From: "Ignatius Reilly" <[EMAIL PROTECTED]> To: "Muhammed Mamedov" <[EMAIL PROTECTED]>; "phpdb" <[EMAIL PROTECTED]> Sent: Friday, January 16, 2004 3:41 PM Subject: Re: [PHP-DB] multi-language site > Preliminary note: > ALL projects should require a CLEAR seperation of code and appearance. > > Now: > To do what you describe, if you present your data as a HTML table, I would > suggest retrieving data from the DB as an arra, and using the PEAR > HTML_Table class to display them. Very easy to learn and extremely powerful. > In addition you can use XSLT if the news are stored as XML strings in the > DB. > > HTH > Ignatius > _ > - Original Message - > From: "Muhammed Mamedov" <[EMAIL PROTECTED]> > To: "Ignatius Reilly" <[EMAIL PROTECTED]>; "phpdb" > <[EMAIL PROTECTED]> > Sent: Friday, January 16, 2004 13:57 > Subject: Re: [PHP-DB] multi-language site > > > > Hello Ignatius, > > > > I am working on a project which requires a CLEAR seperation of code and > > appearance. > > Think of this: There is a page which lists news from DB in a specific > manner > > (latest 10 added, and next,prev links on the bottom). Of course this > > requires some PHP code which will retrieve data from DB and display it. > > Firstly, designers design appearance of the page (in pure HTML/css) and > then > > coders re-code that page embedding pieces of PHP code. What I want to do > is > > to make this process as easy as possible for designers/coders. I am > familiar > > with XML and XSLT, but in "practise" never used XSL to transform XML... > > > > What do you suggest? > > Waiting for your suggestions. > > > > M.Mamedov > > > > - Original Message - > > From: "Ignatius Reilly" <[EMAIL PROTECTED]> > > To: "Dan Hewins" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > > Sent: Thursday, January 15, 2004 8:03 PM > > Subject: Re: [PHP-DB] multi-language site > > > > > > > I would not consider a DB-based design. > > > > > > I use two approaches (sometimes mixed): > > > > > > 1. Write content in XML files (one per language) and transform them with > > > XSLT. This is nice for mostly content-based sites. > > > > > > 2. Write the complete application in English and translate it with the > > > excellent PHP gettext() extension. Makes it fast, efficient and very > cheap > > > to maintain. A better option for web applications. > > > > > > In any case the user's language must be stored in a session variable. > > > > > > HTH > > > Ignatius > > > > > > _ > > > - Original Message - > > > From: "Dan Hewins" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Thursday, January 15, 2004 18:50 > > > Subject: [PHP-DB] multi-language site > > > > > > > > > > Forgive me if this is pedestrian or has been covered before. I'm new > > > > to the list and I haven't used PHP too much (yet). > > > > > > > > Here's my question: > > > > > > > > I'm looking to use PHP for an upcoming site project where the site > > > > needs to be in either English or Spanish. Would PHP be a good > approach? > > > > I was envisioning having a database with every text bit and image with > > > > text in it in two columns, one for English, and one for Spanish. Then > > > > each web page would reference some kind of global variable (a cookie?) > > > > to determine whether to pull the images and text from the English > > > > column or the Spanish column. Does this sound like a good approach? Is > > > > PHP capable of something like this? > > > > > > > > Thanks for any help or suggestions you can give. > > > > > > > > Dan Hewins > > > > > > > > -- > > > > 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 > > > > > > > > > > -- > > 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 > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,
[PHP-DB] ldap api synchronous but no timeout
Hi all, I got a matter: I'm developping "daemon" in php stand alone mode. My application is designed to send same object on both ldap server (sort of replication) But once connected and bind on both server, I treat some ldap commands and IF one of the servers crash (simulating a network failure by stoping network service) My script BLOCK on the current ldap action. AND there is NO timeout How this API can return (LDAP_SERVER_DOWN:0x51) Have you got any solution, or even saw that behavior before ? regards Alban -- Alban Médici R&D software engineer -- you can contact me @ : IPPhone : +33 (0)2 31 46 37 68 [EMAIL PROTECTED] http://www.netcentrex.net -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] multi-language site
Preliminary note: ALL projects should require a CLEAR seperation of code and appearance. Now: To do what you describe, if you present your data as a HTML table, I would suggest retrieving data from the DB as an arra, and using the PEAR HTML_Table class to display them. Very easy to learn and extremely powerful. In addition you can use XSLT if the news are stored as XML strings in the DB. HTH Ignatius _ - Original Message - From: "Muhammed Mamedov" <[EMAIL PROTECTED]> To: "Ignatius Reilly" <[EMAIL PROTECTED]>; "phpdb" <[EMAIL PROTECTED]> Sent: Friday, January 16, 2004 13:57 Subject: Re: [PHP-DB] multi-language site > Hello Ignatius, > > I am working on a project which requires a CLEAR seperation of code and > appearance. > Think of this: There is a page which lists news from DB in a specific manner > (latest 10 added, and next,prev links on the bottom). Of course this > requires some PHP code which will retrieve data from DB and display it. > Firstly, designers design appearance of the page (in pure HTML/css) and then > coders re-code that page embedding pieces of PHP code. What I want to do is > to make this process as easy as possible for designers/coders. I am familiar > with XML and XSLT, but in "practise" never used XSL to transform XML... > > What do you suggest? > Waiting for your suggestions. > > M.Mamedov > > - Original Message - > From: "Ignatius Reilly" <[EMAIL PROTECTED]> > To: "Dan Hewins" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Thursday, January 15, 2004 8:03 PM > Subject: Re: [PHP-DB] multi-language site > > > > I would not consider a DB-based design. > > > > I use two approaches (sometimes mixed): > > > > 1. Write content in XML files (one per language) and transform them with > > XSLT. This is nice for mostly content-based sites. > > > > 2. Write the complete application in English and translate it with the > > excellent PHP gettext() extension. Makes it fast, efficient and very cheap > > to maintain. A better option for web applications. > > > > In any case the user's language must be stored in a session variable. > > > > HTH > > Ignatius > > > > _ > > - Original Message - > > From: "Dan Hewins" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Thursday, January 15, 2004 18:50 > > Subject: [PHP-DB] multi-language site > > > > > > > Forgive me if this is pedestrian or has been covered before. I'm new > > > to the list and I haven't used PHP too much (yet). > > > > > > Here's my question: > > > > > > I'm looking to use PHP for an upcoming site project where the site > > > needs to be in either English or Spanish. Would PHP be a good approach? > > > I was envisioning having a database with every text bit and image with > > > text in it in two columns, one for English, and one for Spanish. Then > > > each web page would reference some kind of global variable (a cookie?) > > > to determine whether to pull the images and text from the English > > > column or the Spanish column. Does this sound like a good approach? Is > > > PHP capable of something like this? > > > > > > Thanks for any help or suggestions you can give. > > > > > > Dan Hewins > > > > > > -- > > > 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 > > > > > > -- > 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] multi-language site
Hello Ignatius, I am working on a project which requires a CLEAR seperation of code and appearance. Think of this: There is a page which lists news from DB in a specific manner (latest 10 added, and next,prev links on the bottom). Of course this requires some PHP code which will retrieve data from DB and display it. Firstly, designers design appearance of the page (in pure HTML/css) and then coders re-code that page embedding pieces of PHP code. What I want to do is to make this process as easy as possible for designers/coders. I am familiar with XML and XSLT, but in "practise" never used XSL to transform XML... What do you suggest? Waiting for your suggestions. M.Mamedov - Original Message - From: "Ignatius Reilly" <[EMAIL PROTECTED]> To: "Dan Hewins" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 15, 2004 8:03 PM Subject: Re: [PHP-DB] multi-language site > I would not consider a DB-based design. > > I use two approaches (sometimes mixed): > > 1. Write content in XML files (one per language) and transform them with > XSLT. This is nice for mostly content-based sites. > > 2. Write the complete application in English and translate it with the > excellent PHP gettext() extension. Makes it fast, efficient and very cheap > to maintain. A better option for web applications. > > In any case the user's language must be stored in a session variable. > > HTH > Ignatius > > _ > - Original Message - > From: "Dan Hewins" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, January 15, 2004 18:50 > Subject: [PHP-DB] multi-language site > > > > Forgive me if this is pedestrian or has been covered before. I'm new > > to the list and I haven't used PHP too much (yet). > > > > Here's my question: > > > > I'm looking to use PHP for an upcoming site project where the site > > needs to be in either English or Spanish. Would PHP be a good approach? > > I was envisioning having a database with every text bit and image with > > text in it in two columns, one for English, and one for Spanish. Then > > each web page would reference some kind of global variable (a cookie?) > > to determine whether to pull the images and text from the English > > column or the Spanish column. Does this sound like a good approach? Is > > PHP capable of something like this? > > > > Thanks for any help or suggestions you can give. > > > > Dan Hewins > > > > -- > > 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 > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Embedded DB
If you have enough time, wait till PHP5.0. They are going to embed sqlite into it. Regards, Muhammed Mamedov turkmenweb.com - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, January 16, 2004 1:47 PM Subject: RE: [PHP-DB] Embedded DB > You could try sqlite. http://www.sqlite.com/ would give you more details on > sqlite, http://hu.php.net/sqlite is the PHP manual pages for the sqlite > extension (PHP4). You can download the php_sqlite.dll extension for windows > here as well. > > Neil Morgan > > -Original Message- > From: GUIRAUDOU [mailto:[EMAIL PROTECTED] > Sent: 16 January 2004 10:08 > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Embedded DB > > > > Hi the List, > > Could somebody tell me if it exists < embedded database >. I would like to > integrate a small database in a terminal that has not a big memory size. > Please tell me if this kind of database exist and please give me some > information / an Internet site where found it. > > Regards > > Michel GUIRAUDOU > > -- > 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 > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Embedded DB
You can also use text files for storing your info. On Fri, 16 Jan 2004 11:47:53 -, <[EMAIL PROTECTED]> wrote: You could try sqlite. http://www.sqlite.com/ would give you more details on sqlite, http://hu.php.net/sqlite is the PHP manual pages for the sqlite extension (PHP4). You can download the php_sqlite.dll extension for windows here as well. Neil Morgan -Original Message- From: GUIRAUDOU [mailto:[EMAIL PROTECTED] Sent: 16 January 2004 10:08 To: [EMAIL PROTECTED] Subject: [PHP-DB] Embedded DB Hi the List, Could somebody tell me if it exists < embedded database >. I would like to integrate a small database in a terminal that has not a big memory size. Please tell me if this kind of database exist and please give me some information / an Internet site where found it. Regards Michel GUIRAUDOU -- WBR, Artiom N. Matiuhov aka MuToGeN <[EMAIL PROTECTED]> -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Subselect ?
Hi, I have a Mysql table of texts in different languages : id_readme id_script (the object that the text describes) id_language (the language the text is written in) etc. So two texts may have the same id_script but with different id_language. I need to retrieve the list (without duplicate) of id-script that are described in one language and NOT in another. Is there hope ? Any help would be welcome. Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Embedded DB
Thank you very much I will look on this site. Regards Message Classification: [X] General Public Use [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary Michel GUIRAUDOU -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: vendredi 16 janvier 2004 12:48 To: Michel Guiraudou; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Embedded DB You could try sqlite. http://www.sqlite.com/ would give you more details on sqlite, http://hu.php.net/sqlite is the PHP manual pages for the sqlite extension (PHP4). You can download the php_sqlite.dll extension for windows here as well. Neil Morgan -Original Message- From: GUIRAUDOU [mailto:[EMAIL PROTECTED] Sent: 16 January 2004 10:08 To: [EMAIL PROTECTED] Subject: [PHP-DB] Embedded DB Hi the List, Could somebody tell me if it exists < embedded database >. I would like to integrate a small database in a terminal that has not a big memory size. Please tell me if this kind of database exist and please give me some information / an Internet site where found it. Regards Michel GUIRAUDOU -- 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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Embedded DB
You could try sqlite. http://www.sqlite.com/ would give you more details on sqlite, http://hu.php.net/sqlite is the PHP manual pages for the sqlite extension (PHP4). You can download the php_sqlite.dll extension for windows here as well. Neil Morgan -Original Message- From: GUIRAUDOU [mailto:[EMAIL PROTECTED] Sent: 16 January 2004 10:08 To: [EMAIL PROTECTED] Subject: [PHP-DB] Embedded DB Hi the List, Could somebody tell me if it exists < embedded database >. I would like to integrate a small database in a terminal that has not a big memory size. Please tell me if this kind of database exist and please give me some information / an Internet site where found it. Regards Michel GUIRAUDOU -- 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
[PHP-DB] Embedded DB
Hi the List, Could somebody tell me if it exists < embedded database >. I would like to integrate a small database in a terminal that has not a big memory size. Please tell me if this kind of database exist and please give me some information / an Internet site where found it. Regards Michel GUIRAUDOU -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Solaris apache 2.0.47 + php 4.3.4 + oracle 9i ( oci8 support in php as shared module )
Hiho Martin, Martin Marques wrote: If i make any DB connections from any Virtual Server that i configured in apache, PHP always takes the Main Ethernet Interface. Not The Virtual IP's of the card that are configure in the httpd.conf. This isn't a real problem, maybe it's allready solved. I'm not sure. But is their a way to declare over which ip PHP calls the Oracle Database ? I think no. By the way, Solaris has some obscure ways of working with multiple net interfaces. Yes i know. It's little bit the same like on BSD systems. But this should be no problem cause only the name not the virutal interface syntax. It littel bit diffrent but mostly the same. or even if this not exists, should their not be a way to delcare this. Im thinking of in a secure reason, i think it should. Why would you think that there's a risk? If you have control over your server you shouldn't have any trouble (always speeking as an unknowledged person to Oracle configuration). The only risks are if you have multiple Stages of the Platform where you Build up a secure Site with applications. It's in my opinion more straight if you can assign The Oracle Client to the Virtual Server with the Virtual IP. Even it's more straight in the Networkplan and the firewall rules. It's a little bit similar like applications who bind ther interface on *. <- no good :) Regards Daniel -- -- Pixelpark AG . . . . . . . . . . . . . . . . . . . . . . . . . Daniel Sand . Webmaster . http://www.pixelpark.com rotherstr. 8 . 10245 Berlin . Germany phone: + 49.30.505.8 - 1790 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Connectivity PHP4 > mysql
Hi! That depends on what you mean... Mysql is listed in the config as "--with-mysql=shared,/usr" and also appears in "Supported databases". It does not show in a seperate paragraph like it does on my working system. -Georg "Micah Stevens" <[EMAIL PROTECTED]> skrev i melding news:[EMAIL PROTECTED] > > Sounds like you don't have MySQL turned on in PHP. Check phpinfo(); to see if > the module is listed in there. > > -Micah > > On Thu January 15 2004 2:42 pm, Georg Herland wrote: > > Hi > > > > I've got two servers, one (RH9) with PHP4 and mysql-server and one (RH7.3) > > running PHP4 and mysql client only. > > > > The problem is that I get the following errormessage from PHP when trying > > to open a db-link: > > > > PHP Fatal error: Call to undefined function: mysql_connect() in > > /data1/www/root/test.php on line 3... > > > > Running mysql client works fine, same as PHP in general. > > I have compared the two servers and cannot find any major differences in > > PHP configuration, in fact they are identical, and the rpm php-mysq -packet > > is in place too. > > > > Is this situation familiar to anyone of you? > > All help is appreciated! > > > > Georg Herland > > Bergen, Norway -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php