RE: [PHP-DB] Resource id #5
Been a positive integer, it jeans that the SQL query was succesfully executed, read the function description. __ Miguel Guirao Aguilera, Linux+, ITIL Sistemas de Información Informática R8 Ext. 7540 -- -Original Message- -- From: Richard Dunne [mailto:[EMAIL PROTECTED] -- Sent: Thursday, March 27, 2008 11:51 AM -- To: php-db@lists.php.net -- Subject: [PHP-DB] Resource id #5 -- -- Can someone explain how I can translate Resource id #5 which is what I -- am getting from the code below? -- -- $result = mysql_query(Select answer from answers) or -- die(mysql_error()); -- $resultArray = explode(',',$result); -- for ($i=0;$isizeof($resultArray);$i++) -- { -- echo $resultArray[$i]; -- } -- -- -- -- -- -- 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] Not updating certain fields in same row
You can't use the function empty() because as soon as the form is submitted, the value of an empty field in the form, is a blank in the variable in your script, so basically your password field is NOT empty, it has a value, a blank. So you need to test your password field to NOT to be empty, also use a second password field, a confirmation field, so: $querystring=your SQL statement here; If (passwd1 is not blank) and (passwd1==passwd2) then $querystring.=passwd='passwd1' If not You keep intact your first SQL statement without touching the passwd field My two niquel cents! __ Miguel Guirao Aguilera, Linux+, ITIL Sistemas de Información Informática R8 Ext. 7540 -- -Original Message- -- From: Jason Pruim [mailto:[EMAIL PROTECTED] -- Sent: Tuesday, March 25, 2008 11:14 AM -- To: Daniel Brown -- Cc: php-db@lists.php.net -- Subject: Re: [PHP-DB] Not updating certain fields in same row -- -- -- On Mar 25, 2008, at 1:09 PM, Daniel Brown wrote: -- On Tue, Mar 25, 2008 at 12:59 PM, Jason Pruim [EMAIL PROTECTED] -- wrote: -- Hi everyone, -- -- I am attempting to update a record for a login system while leaving -- certain fields untouched if they arn't changed, and am running into -- issues. -- [snip!] -- -- I have tried this code: -- $tab = \t; -- if (!isset($_POST['txtLoginName']) || -- empty($_POST['txtLoginName'])) { -- -- $loginName = -- mysqli_real_escape_string($chpwpostlink, -- $_POST['txtLoginName']); -- } -- else -- { -- $loginName = $tab; -- } -- -- Mmm-hmm and exactly how do that work to update the database? -- The SQL query you're probably looking for would be like this: -- -- $sql = UPDATE users SET -- Field1 -- = -- '.mysql_real_escape_string -- ($field1).',Field3='.mysql_real_escape_string($field3).' -- WHERE id='.mysql_real_escape_string($id).' LIMIT 1; -- -- the actual query I'm using is this: -- -- $chpwsql = UPDATE current SET customerName='$customerName', -- loginName='$loginName', loginPassword='$PW', email='$email', -- adminLevel='$adminLevel' WHERE Record='$Record1'; -- -- What it is doing now is if I don't set a a field I am replacing the -- content of it with a tab, which isn't what I want. Basically what I'm -- looking for is if loginPassword hasn't changed... don't clear the -- contents of it. if it has changed, then update loginPassword -- -- -- -- -- -- -- /Daniel P. Brown -- Forensic Services, Senior Unix Engineer -- 1+ (570-) 362-0283 -- -- -- -- PHP Database Mailing List (http://www.php.net/) -- To unsubscribe, visit: http://www.php.net/unsub.php -- -- -- -- -- -- -- Jason Pruim -- Raoset Inc. -- Technology Manager -- MQC Specialist -- 3251 132nd ave -- Holland, MI, 49424-9337 -- www.raoset.com -- [EMAIL PROTECTED] -- -- -- -- -- -- -- 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] Password Reset
As every body as said, it is not a best security practice to decrypt passwords if the user forgets it. You should not provide of ways for hackers to decrypt such passwords in the event of a security incident. You better allow users to reset their passwords after providing evidence of her/his authentication. __ Miguel Guirao Aguilera, Linux+, ITIL Sistemas de Información Informática R8 Ext. 7540 -- -Original Message- -- From: Nasreen Laghari [mailto:[EMAIL PROTECTED] -- Sent: Miércoles, 27 de Febrero de 2008 12:52 a.m. -- To: php-db@lists.php.net -- Subject: [PHP-DB] Password Reset -- -- Hi, -- -- I have encrypted password in database and I encrypted using MD5(). As -- it is a one-way Hash so I cant get password back to original text !!! -- -- What encrypting technique I used to encrypt password so if user forget, -- I can decrypt password and email it. -- -- -- Regards -- -- Nasreen -- -- -- -- -- -- Looking for last minute shopping deals? -- Find them fast with Yahoo! Search. -- http://tools.search.yahoo.com/newsearch/category.php?category=shopping -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] PHP help question
Chances are that the port on PC A is blocked for the DB service. Or that your DB server has been configured to not to accepp connections ffrom the outside. __ Miguel Guirao Aguilera, Linux+, ITIL Sistemas de Información Informática R8 Ext. 7540 -- -Original Message- -- From: Rudy sleiman [mailto:[EMAIL PROTECTED] -- Sent: Miércoles, 13 de Febrero de 2008 09:53 a.m. -- To: php-db@lists.php.net -- Subject: [PHP-DB] PHP help question -- -- To whom it may concern -- -- I'm working on a network, i don't have internet access and the -- application i'm working on is not published online. -- -- Platform used: PHP with MySQL. -- -- The Database is created on PC A... I'm working on PC B... and my -- problem is that i am not able to connect to the PC A Database using -- the IP address as a host (since the database is not on my machine). -- but if i'm on PC A i can connect with the localhost. -- -- The question is that: do i need any configuration so i can access the -- database? -- -- Waiting for your reply -- -- Regards, -- Rudy. -- -- -- -- 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] PHP help question
Chances are that the port on PC A is blocked for the DB service. Or that your DB server has been configured to not to accepp connections ffrom the outside. __ Miguel Guirao Aguilera, Linux+, ITIL Sistemas de Información Informática R8 Ext. 7540 -- -Original Message- -- From: Rudy sleiman [mailto:[EMAIL PROTECTED] -- Sent: Miércoles, 13 de Febrero de 2008 09:53 a.m. -- To: php-db@lists.php.net -- Subject: [PHP-DB] PHP help question -- -- To whom it may concern -- -- I'm working on a network, i don't have internet access and the -- application i'm working on is not published online. -- -- Platform used: PHP with MySQL. -- -- The Database is created on PC A... I'm working on PC B... and my -- problem is that i am not able to connect to the PC A Database using -- the IP address as a host (since the database is not on my machine). -- but if i'm on PC A i can connect with the localhost. -- -- The question is that: do i need any configuration so i can access the -- database? -- -- Waiting for your reply -- -- Regards, -- Rudy. -- -- -- -- 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] PHP help question
Chances are that the port on PC A is blocked for the DB service. Or that your DB server has been configured to not to accepp connections ffrom the outside. __ Miguel Guirao Aguilera, Linux+, ITIL Sistemas de Información Informática R8 Ext. 7540 -- -Original Message- -- From: Rudy sleiman [mailto:[EMAIL PROTECTED] -- Sent: Miércoles, 13 de Febrero de 2008 09:53 a.m. -- To: php-db@lists.php.net -- Subject: [PHP-DB] PHP help question -- -- To whom it may concern -- -- I'm working on a network, i don't have internet access and the -- application i'm working on is not published online. -- -- Platform used: PHP with MySQL. -- -- The Database is created on PC A... I'm working on PC B... and my -- problem is that i am not able to connect to the PC A Database using -- the IP address as a host (since the database is not on my machine). -- but if i'm on PC A i can connect with the localhost. -- -- The question is that: do i need any configuration so i can access the -- database? -- -- Waiting for your reply -- -- Regards, -- Rudy. -- -- -- -- 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] md5() function
Hi!! I'm using the md5() function to encrypt a password and store it into a database. Now I want to retrieve that MD5 password and convert it into it's human readable condition. Is there a function opposite to md5()?? Best Regards, M Guirao -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Select...
Hello List, I'm having kind of trouble to get done this: Select data from a table, except those data already in a second table. Actually, if there is a rowid in table2, I wont get it from table1, rowid is the key that relates both tables. I just can't express this with a SQL statement!! idequipomed is the key that relates both tables!! So, if idequipomed is already in Table2, I shouldn't get it from Table1. Any suggestions? Table1 FieldType NullKey Default Extra Privileges --- --- -- -- -- -- --- idequipomed tinyint(3) unsigned PRI (NULL) auto_increment select,insert,update,references idcattinyint(3) 0 select,insert,update,references af varchar(10) select,insert,update,references ns varchar(10) select,insert,update,references deptovarchar(40) YES (NULL) select,insert,update,references zona char(3) select,insert,update,references reqcal char(1) YES 1 select,insert,update,references tipocal char(1) select,insert,update,references estado char(2) select,insert,update,references alta date -00-00 select,insert,update,references ubicacionvarchar(15) 0 select,insert,update,references Table2 FieldType NullKey Default Extra Privileges --- --- -- -- --- -- - -- calidtinyint(4) unsigned PRI (NULL) auto_increment select,insert,update,references idequipomed tinyint(4) unsigned 0 select,insert,update,references faseid tinyint(4) unsigned 0 select,insert,update,references ultimacaldate YES (NULL) select,insert,update,references proxcal date YES (NULL) select,insert,update,references idcattinyint(4) unsigned 0 select,insert,update,references -Original Message- From: Daniel Brown [mailto:[EMAIL PROTECTED] Sent: Lunes, 14 de Enero de 2008 01:55 p.m. To: Miguel Guirao Cc: php-db@lists.php.net Subject: Re: [PHP-DB] md5() function On Jan 14, 2008 2:26 PM, Miguel Guirao [EMAIL PROTECTED] wrote: Hi!! I'm using the md5() function to encrypt a password and store it into a database. Now I want to retrieve that MD5 password and convert it into it's human readable condition. Is there a function opposite to md5()?? Negative. Once it's hashed with an MD5, SHA1, or similar encryption method, it's (as of now) impossible to reverse. You could create a table with a column of unencrypted phrases, characters, and combinations, with a second column containing the correlating hashed string, but that's about it. -- /Dan Daniel P. Brown Senior Unix Geek and #1 Rated Year's Coolest Guy By Self Since Nineteen-Seventy-[mumble]. -- 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] md5() function
Thanks every body for your replies!! It is clear to me that I can not reverse a hased string!! Thanks!!! Guirao -Original Message- From: Jason Gerfen [mailto:[EMAIL PROTECTED] Sent: Lunes, 14 de Enero de 2008 02:04 p.m. Cc: php-db@lists.php.net Subject: Re: [PHP-DB] md5() function Steven Cruz wrote: Hello; I maybe wrong, but I believe it is one way. What you need to do is take your input and encrypt it and check if matches your current encrypted value. :) peace and hugs. Miguel Guirao wrote: Hi!! I'm using the md5() function to encrypt a password and store it into a database. Now I want to retrieve that MD5 password and convert it into it's human readable condition. Is there a function opposite to md5()?? Best Regards, M Guirao If you want to do a comparison on the md5() hash you just created you could always run your SQL query like: SELECT * FROM `table` WHERE `password` = md5( $password ) LIMIT 1; That will return a true or false value based on the md5() hash of the $password var. But you cannot reverse the md5 hash to obtain the original value unless you perform a crack on it using software available software. I think what you are looking for is the base64_encode() and base64_decode() functions which will perform a simple encoding of data. -- Jason Gerfen I practice my religion while stepping on your toes... ~The Ditty Bops -- 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] forms and method POST - variables
Well, it depends if you use an old version of PHP, in the latest version both arrays $_POST and $_GET are used to get passed variables!! I can't remember since what version PHP started to use these arrays!! MG -Original Message- From: Lukáš Moravec [mailto:[EMAIL PROTECTED] Sent: Miércoles, 09 de Enero de 2008 10:26 a.m. To: php-db@lists.php.net Subject: [PHP-DB] forms and method POST - variables Hi, I have one question about forms and php (which I use for Mysql too). Do I need for variables from any form in html and method POST (then in php script) to set these variables with: $variable=$_POST['variable']; For example: html head title FORM/title /head body form action=do_something.php method=POST Input something br input type=text name=variable input type=submit value=submit /FORM /body /html And then.in do_something.php html head titleDO SOMETHING/title /head body ?php $variable=$_POST['variable']; echo brbVariable: /b.$variable; ? /body /html Because I got some old scripts where I don´t have this setting.they worked on MS Win2000 - PWS and PHP 4.0 but now - with Apache 2.2.6, PHP 5.2 on WIN XP it doesn´t work. Thank you for any advice. Lukas -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Connection error!
No, the DB server has MySQL 5.0.18 -Original Message- From: Matteo Cisilino [mailto:[EMAIL PROTECTED] Sent: Lunes, 18 de Junio de 2007 09:47 a.m. To: php-db@lists.php.net Subject: Re: [PHP-DB] Connection error! Alle 16:26, lunedì 18 giugno 2007, MIGUEL ANTONIO GUIRAO AGUILERA ha scritto: Hi all, I'm getting this error message Client does not support authentication protocol requested by server, consider upgrading MySQL client when I try to connect to the DB server! Any ideas? All the scripts are in the web server. But the DB server is a different server!! PHP v4.1.2 MySQL v3.23.49 Apache v1.3.23 the computers got the same mysql version ( very extra mega giga obsolete ) ? Matteo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] handling a SELECT that returns nothing
The mysql_query function executes a query againts a DBM and just that, it delivers the query to the DBM, if the DBM can execute the query, it returns a positive integer, if the DBM can not execute the query, it returns 0 or false, can't remember exactly right now. So, it will return a positive integer no matter the query found any records at all, so you must use mysql_num_rows() in order to find out how many records the query returned. -Original Message- From: Tim McGeary [mailto:[EMAIL PROTECTED] Sent: Viernes, 27 de Abril de 2007 10:56 a.m. To: php-db@lists.php.net Subject: [PHP-DB] handling a SELECT that returns nothing I am writing a web php application that is processing a request form. There are multiple times when I need to check if a record exists (i.e. user record) and if so, check the inputted data against the data already in the database and confirm whether the inputted data should update the database. I am getting stuck in my check of whether a record yet exists. I thought that $result in the code snippet below would be empty, so I thought I could use the empty() function in an if conditional. But a later conditional on the returned result of 0 never happened, so I echoed the $result of the mysql_query. I have a completely empty database and my initial test should load my new record, but I am finding that the $result is being filled with Resource id #4 from the mysql_query. Why? What does that mean? Why wouldn't it be empty? And more importantly, how do I this check properly? Thanks, Tim ?php function record_exist($select_value, $search_value, $table, $field) { $query = SELECT $select_value FROM $table WHERE $field = '{$search_value}'; $result = mysql_query(SELECT $select_value FROM $table WHERE $field='{$search_value}') or die(mysql_error()); echo $result.br; if (empty($result)) { return 0; } else { return $result; } } ? Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Re: [PHP-WIN] (DRW) Ordenar por fecha
You have to issue the following query: select id,publico_privado,usuario,fecha,categoria,pequena_comentario,comentario,arc hivo from mi_sitio_personal_menu order by fecha Tienes que usar la siguiente consulta: select id,publico_privado,usuario,fecha,categoria,pequena_comentario,comentario,arc hivo from mi_sitio_personal_menu order by fecha -Original Message- From: bedul [mailto:[EMAIL PROTECTED] Sent: Lunes, 12 de Febrero de 2007 10:41 p.m. To: Anuack Luna Cc: php-windows@lists.php.net; php-db@lists.php.net Subject: [PHP-DB] Re: [PHP-WIN] (DRW) Ordenar por fecha Importance: High english plz you know.. i'm not native with english.. but using english is very helpfull to me for solve your problem - Original Message - From: Anuack Luna [EMAIL PROTECTED] To: php-windows@lists.php.net Sent: Friday, February 09, 2007 6:28 AM Subject: [PHP-WIN] (DRW) Ordenar por fecha Hola Foreros Tengo la siguiente pregunta. Como puedo darle la orden a un juego de registro que me lo ordene por fecha? SELECT * FROM mi_sitio_personal_menu ORDER BY id DESC Si le digo Orden by fecha Desc... Me lo ordena por números, no por fecha. La fecha de la siguiente forma: DIA/MES/AÑO Alguna sugerencia... Adjunto database -- -- Estructura de tabla para la tabla `mi_sitio_personal` -- CREATE TABLE `mi_sitio_personal` ( `id` int(11) NOT NULL auto_increment, `publico_privado` varchar(10) default '0', `usuario` varchar(255) default NULL, `fecha` varchar(100) default NULL, `categoria` varchar(100) default NULL, `pequena_comentario` text, `comentario` text, `archivo` varchar(255) default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -- Volcar la base de datos para la tabla `mi_sitio_personal` -- -- PHP Windows 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 Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] List menus
The solution has been posted before, check the archives! -Original Message- From: David Skyers [mailto:[EMAIL PROTECTED] Sent: Martes, 05 de Diciembre de 2006 07:20 a.m. 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 Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Fulltext SELECTing only part of a field entry
I guess you will still need to get the whole texts, but do the selecting befores displaying results. There are functions to to select an amount of text of certain lenght, starting at certain point of the string. -Original Message- From: benmoreassynt [mailto:[EMAIL PROTECTED] Sent: Viernes, 24 de Noviembre de 2006 11:59 a.m. To: php-db@lists.php.net Subject: [PHP-DB] Fulltext SELECTing only part of a field entry Hi, Not really sure if this is possible. I am using a fulltext search to search through very large entries. Basically an entry might contain 200,000 words, which are searched for exact matches. What I want to do is SELECT, say, the 300 words surrounding the exact match from the 200,000 word entry and pass it to a PHP script, rather than passing the entire 200,000 words to the script. Am I explaining myself clearly? In other words I want to limit the amount of text SELECTed, so that I am not wasting memory, etc, by passing huge strings to PHP. Is it possible? I've done a lot of looking, but the MySQL documentation is pretty limited on fulltext. If it is possible, can anyone give me a rough idea of how to go about it? The end result would be the sort of contextual search text results that you get in a Google search. Many thanks BMA -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Just two PHP questions
1) What exactly I need to download for running PHP on Apache. PHP the latest version 2) What should be the location of the downloaded PHP folder/file/executable so that it interacts easily with Apache. Any, but if you prefer tu indicate an installation directory you may do that by specifing it during configuration: configure -options_here 3) Settings if any ! Read the manual, there are many settings you can set, but basically almost all of them depend upon your production or testing environment Regards, Guirao Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] MySQL SQL Query Help
select max(bar) from mytable where unique fkid order by bar asc as far as I remember!! -Original Message- From: Peter Beckman [mailto:[EMAIL PROTECTED] Sent: Lunes, 13 de Noviembre de 2006 04:59 p.m. To: PHP-DB Mailing List Subject: [PHP-DB] MySQL SQL Query Help I have a table: id fkid foobar 1 1 345yellow 2 1 34 red 3 2 3459 green 4 2 345brown I want to select the largest value of foo for a unique fkid, and return bar, the results ordered by bar. In this case, 345 is the largest value of foo for fkid 1, and 3459 is the largest for fkid 2. green comes before yellow. My desired result set would be: fkid foobar 2 3459 green 1 345yellow How would I write that in SQL? fkid and foo are ints, bar is a varchar. Beckman --- Peter Beckman Internet Guy [EMAIL PROTECTED] http://www.purplecow.com/ --- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Converting text field to barcode CODE 39
Jorge, If you have downloaded FPDF you will se that it comes with a couple of examples that you can use to learn. Miguel Guirao -Original Message- From: Jorge Giménez [mailto:[EMAIL PROTECTED] Sent: Viernes, 27 de Octubre de 2006 04:49 p.m. To: php-db@lists.php.net Subject: [PHP-DB] Converting text field to barcode CODE 39 Hello. Can anyone tell me where I can find information or examples about printing on screen or in PDF (with FDPF for example) for text fields stored on a MySQL Database with PHP 4 , PHP 5. Best regards, Jorge Gimenez Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] ORDER BY
Yes! Just separate your columns with commas! Check out the proper sintax!! -Original Message- From: Ron Piggott (PHP) [mailto:[EMAIL PROTECTED] Sent: Miércoles, 18 de Octubre de 2006 06:58 p.m. To: PHP DB Subject: [PHP-DB] ORDER BY Is it possible to do an ORDER BY column_a column_b ASC ? IE Can you specify two columns to cause the output to be displayed in a specific order? Ron Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Google Code Search
I hope never!! Specially with disruptive technologies!! Miguel Guirao -Original Message- From: Jeremy Peterson [mailto:[EMAIL PROTECTED] Sent: Martes, 10 de Octubre de 2006 06:29 a.m. To: php-db@lists.php.net Subject: [PHP-DB] Google Code Search Another resource for source code, when will Google stop being so innovative... :) http://www.google.com/codesearch Jeremy Jeremy Peterson, MACS Automation Systems Administrator Education Technology Services Moody Bible Institute 820 N. LaSalle Drive Chicago, IL, 60610 Email: [EMAIL PROTECTED] Phone: 312.329.8081 Fax:312.329.8959 Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Diff between 2 date
I use CalcDateDiff.php class and it works pretty good! I got it at PHP Classes.org -Original Message- From: Nandar [mailto:[EMAIL PROTECTED] Sent: Jueves, 05 de Octubre de 2006 10:16 p.m. To: php-db@lists.php.net Subject: [PHP-DB] Diff between 2 date How to know diff between 2 date ? tgl1 = 2006-10-05 tgl2 = 2006-10-06 result = 1 day nandar -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] SQL query
Hello list, Whats wrong with my SQL query: $query=select email from usuarios where userName = (select username from fussv where folio = 'FUSS-130-2006'); I get an error! I have tested the two individual sentences and they worked OK! --- Miguel Guirao Aguilera Logistica R8 TELCEL Tel. (999) 960.7994 Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] SQL query
OK, this makes my day clear!! I have versión 3.23.49-3 of MySQL Thanks Dwight! -Original Message- From: Dwight Altman [mailto:[EMAIL PROTECTED] Sent: Jueves, 28 de Septiembre de 2006 11:32 a.m. To: php-db@lists.php.net Subject: RE: [PHP-DB] SQL query Check your version. Subselects were only added in MySQL Version 4.1. Regards, Dwight -Original Message- From: Edwin Cruz [mailto:[EMAIL PROTECTED] Sent: Thursday, September 28, 2006 10:53 AM To: 'Miguel Guirao'; php-db@lists.php.net Subject: RE: [PHP-DB] SQL query Make sure that your second query is returning only one row, if it dont help, try this: $query=select email from usuarios where userName in (select username from fussv where folio = 'FUSS-130-2006') MySQL think that you second query returns more than 1 row, that's why mysql dont accept your query, is like trying to compare vs more than one scalar value Regards! ++ | Ing Edwin Cruz [EMAIL PROTECTED] | ++ | Transportes Medel Rogero SA de CV | | | | Desk: +52 (449) 910 30 90 x3054 | ++ | MX Mobile: +52 (449) 111 29 03 | | Aguascalientes, Mexico | | http://www.medel.com.mx | ++ -Mensaje original- De: Miguel Guirao [mailto:[EMAIL PROTECTED] Enviado el: Jueves, 28 de Septiembre de 2006 09:09 a.m. Para: php-db@lists.php.net Asunto: [PHP-DB] SQL query Hello list, Whats wrong with my SQL query: $query=select email from usuarios where userName = (select username from fussv where folio = 'FUSS-130-2006'); I get an error! I have tested the two individual sentences and they worked OK! --- Miguel Guirao Aguilera Logistica R8 TELCEL Tel. (999) 960.7994 Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- 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] Strange problem!
Hi all, I resolved the problem moving the ob_end_flush() function to the end of the scrip and calling the mail function before! -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Miércoles, 23 de Agosto de 2006 09:55 p.m. To: Miguel Guirao Cc: php-db@lists.php.net Subject: Re: [PHP-DB] Strange problem! Miguel Guirao wrote: Hello everybody out here and there, I'm experiencing a weird problem with one of my scripts, I'm using ob_start() in order to store the content of a web page in a string variable: $salida=ob_get_contents(); ob_end_flush(); $doc=$rmat..doc; $file=fopen($doc,w); fputs($file,$salida); fclose($file); The file is actually created! But, I try to call a mail function (not the mail built-in function) after that code in order to mail the recently created file, but a get a blank page in the browser, just with the basic HTML tags if a look at the source code. If a remove or comment out any code below that, the script returns to live again. Start putting debug code into your script(s) and see where it gets to. This is simple but effective: echo In file . __FILE__ . got to line . __LINE__ . br/; and see where it stops. Check your apache error log and see if that contains any info. (You'd get a better response from the php-general list rather than the php-db list). -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Strange problem!
Hello everybody out here and there, I'm experiencing a weird problem with one of my scripts, I'm using ob_start() in order to store the content of a web page in a string variable: $salida=ob_get_contents(); ob_end_flush(); $doc=$rmat..doc; $file=fopen($doc,w); fputs($file,$salida); fclose($file); The file is actually created! But, I try to call a mail function (not the mail built-in function) after that code in order to mail the recently created file, but a get a blank page in the browser, just with the basic HTML tags if a look at the source code. If a remove or comment out any code below that, the script returns to live again. Any ideas of what is going on? BEST REGARDS, --- Miguel Guirao Aguilera Logistica R8 TELCEL Tel. (999) 960.7994 Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Taking care of an auto_increment field!
Hi pals, I have a module in my PHP application that creates and id (string + the auto_increment field). I read the last auto_increment value from the table, then in my code I use it as the base to create a second id (the auto_increment field + string). This happens for as many hardware the user has selected to send for repairment but, What if another user also is sending hardware for repairment? His process will also read the same auto_increment value from the table, will use it to create the second id field in my code, so, probably I will have ids like: Last auto_increment value = 1 User A VSA002 VSA003 User B TUX002 TUX003 I have a constraint: The ID part (from string + the auto_increment field) should be continuos! I can not have two IDs with the same auto_increment value in it!! Is there a way to use transactios in MySQL?? Or maybe using a global variable accesed by all the processes running in the server? Or actually creating the auto_increment fields by inserting as many rows needed, but what if the user cancels the operatuion? Or another different approach to solve this problem? Regards, Miguel Guirao Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Populating an array to the next script!
Hello, Is there a way to populate an array from one script to the next one? I'm using a form, and a hidden field for such desire: input name=hwt[] type=hidden value=?php echo($hwGSM);? but it returns this: input name=hwt[] type=hidden value=Array then I pretend to read the array again at the target script by coding the following: $hw=$_POST['hwt']; $hwGSM=$hw[0]; for($i=0;$i=$maxpoint;$i++){ echo($hwGSM[$i]); } It should be pretty easy but I have not done it ever! Regards, Miguel Guirao P.S. I can not get rid of of the below crap!! I know is annoying, but it's a policy! Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] mysqldump via php
You could use exec() within PHP! -Original Message- From: Adrian Bruce [mailto:[EMAIL PROTECTED] Sent: Jueves, 29 de Junio de 2006 06:31 a.m. To: Jeffrey Cc: PHP DB Subject: Re: [PHP-DB] mysqldump via php mysqldump is a .exe, and therefore it will not work within mysql_query(); You may be able to use mysqldump from PHP using the system function check out http://uk.php.net/system Ade Jeffrey wrote: I would like to do a backup of an entire MySQL database via php. My thought was to use mysqldump, write the data to a file and save the file. However... $query=mysqldump $dbase; $result=mysql_query($query) or die(mysql_error()); ...immediately results in an error in your SQL syntax near mysqldump [database name]. The reason I want to do a MySQL back up via php is that I have a web application in which the user can archive a project, which involves moving a lot data from one set of tables to another set of tables. The user can also delete a project, which removes lots of data from the DB altogether. Although there are lots of Are you sure you really want to do this? messages the user must click upon, I am sure I will eventually get a user telling me she accidentally archived/deleted stuff and can I help. So, my thought was to do a incorporate a mysqldump in the archiving/delete page. That way there would be a snapshot of the pre-action db, making it easy to put things right. Can you help with my query - or by suggesting an alternative solution? Thanks, Jeffrey -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Converting to Decimal
You could actually do (int) $var or use the sprintf(%d, $var); -Original Message- From: John Meyer [mailto:[EMAIL PROTECTED] Sent: Miércoles, 28 de Junio de 2006 06:04 p.m. To: [EMAIL PROTECTED] Cc: Php-Db Subject: Re: [PHP-DB] Converting to Decimal Mark Bomgardner wrote: I am query a database and pulling some decimal values out of the table, but when I display whole numbers in php, it drops the decimal places. It takes a value of 12.00 in the database and makes it 12, where I need 12.00. I am having trouble finding ways to cast this value. First, off, when you directly query the database, does it come back as a floating number. And secondly, have you checked this out: http://www.php.net/manual/en/function.sprintf.php -- Online library -- http://pueblonative.110mb.com 138 books and counting. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] PHP/Mysql search
CREATIVITY is what you are looking for. -Original Message- From: Eustace [mailto:[EMAIL PROTECTED] Sent: Lunes, 22 de Mayo de 2006 07:59 a.m. To: php-db@lists.php.net Subject: [PHP-DB] PHP/Mysql search Hello, Please be patient and assist meI am building a web application where a search function is required. I have a number of drop down lists from which a user has to select what they are searching for..they may choose to do a multi-fields search or search only one. Are there any resources you can point me to which implements something like this? Eustace Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Duplicate rows
Thanks to every one that gave their inputs in order to solve my problem. It was solved with a simple SQL statement using a sub-query like: insert into products (id, code, desc, everused) select distinct '', code,desc, everused from catalog Now my products table has only 8500 records!! -Original Message- From: Ade Olonoh [mailto:[EMAIL PROTECTED] Sent: Miércoles, 01 de Marzo de 2006 12:19 p.m. To: Miguel Guirao Cc: php-db@lists.php.net Subject: Re: [PHP-DB] Duplicate rows Assuming you're using MySQL, instead of using INSERT INTO, you can use REPLACE INTO instead. If you have unique keys on that table, the new record will overwrite existing records with the same unique keys instead of creating a new one. http://dev.mysql.com/doc/refman/5.0/en/replace.html --Ade. Miguel Guirao wrote: My dear beloved friends, I have a catalog of products that a product provider gave, sadly for me, in this CSV file there are many duplicated rows. I edited the file in my Linux system with the uniq -u command, and it worked somewhat fine, it eliminated some duplicated rows, originally the file had 24K rows, and now it has been reduced to 15k rows. Anyhow, there are still duplicated rows, and since this is a catalog, it should not have duplicated rows!!! Now the catalog has been has been loaded into the DB. How can I continue eliminating duplicated rows? As far as I remember the is a sentence in SQL to only show ONE row of duplicated rows, maybe if I do a select using this sentence and then put this new recordset in another table, it will work!! Any ideas? --- Miguel Guirao Aguilera Logistica R8 TELCEL Tel. (999) 960.7994 Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- Ade Olonoh - Independent Software Developer http://ade.olonoh.com | http://blog.olonoh.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] Duplicate rows
My dear beloved friends, I have a catalog of products that a product provider gave, sadly for me, in this CSV file there are many duplicated rows. I edited the file in my Linux system with the uniq -u command, and it worked somewhat fine, it eliminated some duplicated rows, originally the file had 24K rows, and now it has been reduced to 15k rows. Anyhow, there are still duplicated rows, and since this is a catalog, it should not have duplicated rows!!! Now the catalog has been has been loaded into the DB. How can I continue eliminating duplicated rows? As far as I remember the is a sentence in SQL to only show ONE row of duplicated rows, maybe if I do a select using this sentence and then put this new recordset in another table, it will work!! Any ideas? --- Miguel Guirao Aguilera Logistica R8 TELCEL Tel. (999) 960.7994 Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] PHP, MySQL and Apache
Answer 1. No, you do not need Apache. You could be using IIS along with PHP and MySQL if that is what you need! But talking about natural relationships, there is nothing better that the great combitation formed by XAMP. Answer 2. There is a MySQL API specially done for PHP, so there is no need to use another different API. Search for functions like mysql_pconnect(), mysql_select_db(), mysql_query() and related functions on the php web site. Chicolinux!! -Original Message- From: Kinfe Tadesse [mailto:[EMAIL PROTECTED] Sent: Lunes, 27 de Febrero de 2006 09:07 a.m. To: php-db@lists.php.net Subject: [PHP-DB] PHP, MySQL and Apache Hi all, I intend to create a database to be accessed from a voice application. I plan to use MySQL as a database engine and PHP as a scripting language to generate dynamic VoiceXML documents. However, I have two questions I could not get answers to: 1. Do I need to install Apache to work with MySQL and PHP? In other words, can MySQL and PHP work together without Apache. Note: The database and the application are on the same machine for the timebeing. 2. What database API should be used? I recently read about MyODBC. But many standard books skip this part as if PHP and MySQL have something natural to talk to eachother without requiring anything like ODBC, etc. Your answers to these questions are highly appreciated! Best regards, Kinfe T. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] webhosting with php/mysql and disk quota
You could also use the suid bit enable in your permission scripts!! Miguel -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: Lunes, 27 de Febrero de 2006 02:23 p.m. To: php-db@lists.php.net Subject: Re: [PHP-DB] webhosting with php/mysql and disk quota Yes, however, a few of those require root permissions which gets tricky as you DO NOT want to run internet accessable php scripts as root, in which case you're hosed. What I do it run a perl daemon as root that php then connects to as a client and requests actions, and the daemon will only accept connections from localhost. The perl daemon actually does all the root actions. There's several ways to do this, some more secure than others.. But in a word, yes it's possible, but you'll need to give it some thought. -Micah On Monday 27 February 2006 1:01 pm, vassilis wrote: Hello all, is it possible to do the following thing with php/mysql? 1. user registers 2. upon clicking the submit button a php script creates a mysql DB with a unique name ( So far so good, till there I have no prob) 3. the specific user gets SELCT INSERT UPDATE rights for his database only. 4. Mysql quota is set to 10MB 5. user directory with write permission only by the specific user gets created under the www directory. 6. Syncronization of Disk quota and mysql quota e.g. 9MB pictures in the user directory, means 1MB left for mysql or the oposite 9MB mysql data, 1mb free in the user directory. This whole thing must run on its own without someone to create the accounts thanks in advance Vassilis -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Formatting a form box
One approach is to ask the user to input a text delimiter, like a @, for example, in every point where there should be a new line or paragraph. Then, you should parse the text, and at every point you find a @, tu place a BR or P or any other HTML tag that best suits your need!! This is just one solution, but I'm pretty sure there others!! Mike Guirao -Original Message- From: Alex Major [mailto:[EMAIL PROTECTED] Sent: Jueves, 12 de Enero de 2006 10:33 a.m. To: php-db@lists.php.net Subject: [PHP-DB] Formatting a form box Hi there, On one of my forms, there is a section where users can put images etc..and then it is displayed on my php pages. My question is how do I make it so that the html formatting is automatically done. For example when someone is typing something, and wants to start a new paragraph although they press return when typing when the data is displayed from the MySQL database on a website it's just continuous text. For it to start a new paragraph they have to put p in when they are typing in this box. They do not know all the html formatting codes, and so I need someway of making so that it is easy for them to have formatted text without doing all the html. Also things like changing colours, bold, italic and things would be good. Something like on forums, where when you enter a new post you have all the formatting options. Hope this makes sense, Regards, Alex. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] No posts in 36 hours??
Very active!! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Miercoles, 11 de Enero de 2006 03:06 p.m. To: php-db@lists.php.net Subject: [PHP-DB] No posts in 36 hours?? List Active? David -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Connecting to two MySQL databases
I agree with this solution!! -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: Jueves, 29 de Septiembre de 2005 01:10 p.m. To: php-db@lists.php.net Subject: Re: [PHP-DB] Connecting to two MySQL databases I don't see a reason to duplicate the class code, just make it keep track of the $link variable, and each instance of the class can be a seperate connection.. Then you can do what you want: $db1 = new dbconn; $db2 = new dbconn; $db1-dbconn($host, $user, $pw); $db2-dbconn($host2, $user2, $pw2); $result_from_first_db = $db1-retrieveData($sql); $result_from_second_db = $db2-retrieveData($sql); You're making the class too specific. IMHO. -Micah On Thursday 29 September 2005 10:56 am, Charles Kline wrote: Hi all, I am working on an application that requires me to connect to two MySQL databases both hosted on the same server. I have an existing set of class files I created to handle the db connection to the main database. To connect to the second database, I duplicated my db class files and renamed them, and also renamed the functions etc. but what is happening, is that the calls made to the second database connection seem to get made against the first database. So that I get errors like: dbname.tablename was not found (or something like that). What is the best practice for this? I need to have two open db connections for just two little things in my application. My class files are one makes the connection and the other calls the various get and set functions to the db. Here is what I have for the dbconnect.php class: class dbconn { // database setup. These should be changed accordingly. var $dbpath = localhost; var $dbname = mydb; var $dblogin = test; var $dbpass = test; function dbconn() { $link = mysql_connect($this-dbpath, $this-dblogin, $this- dbpass) or die ('Not Connected: ' . mysql_error()); mysql_select_db($this-dbname, $link) or die ('Can\'t use this database: ' . mysql_error()); } function retrieveData( $sql ) { $rs = mysql_query( $sql ) or die(Invalid query: . mysql_error ()); // if no result, return null if (($rs == null) || (mysql_num_rows($rs) == 0)) { return null; } else { return ( $rs ); } } function insertData( $sql ) { mysql_query( $sql ); // return new complaint id if insert is successful if ( mysql_affected_rows() 0 ) { return ( mysql_insert_id() ); } else { return null; } } function updateData( $sql ) { $rs = mysql_query( $sql ); if (mysql_affected_rows() 0) { return ( $rs ); } else { return null; // no changes were made } } } I posted this to the php-general list the other day, but never got it working right with the suggestions. Sorry if this is a repeat for anyone. - Charles -- RightCode, Inc. 900 Briggs Road #130 Mount Laurel, NJ 08054 P: 856.608.7908 F: 856.439.0154 E: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List
RE: [PHP-DB] begginer question
First, you need to normalize your DB, maybe going up to the Third Normal Form will give you a good DB design. Second, there is a SQL parameter that let's you display only one record from many duplicated records, equal records, I guess it is UNIQUE. -Original Message- From: ziv gabel [mailto:[EMAIL PROTECTED] Sent: Sabado, 03 de Septiembre de 2005 02:35 p.m. To: php-db@lists.php.net Subject: [PHP-DB] begginer question Hi everyone I just need something that I believe is very simple only I can't find an answer for it anywhere I have a database that each row has a machine, its serial, the customer and other details. The problem is that I have customers with more than one machine and I need to query for all the rows, but I don't want the rows that contain duplicate customers. The problem is that the only way for me to know the right row from let's say 3 rows that contain the same customer name is the serial number which needs to be the higher. So all I need a query to do that. Thanks in advanced Ziv -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Storing an array on a table?
Hi!! I want to store an array into a field on a MySQL table, Is it posible to save it? Maybe into a string field? Best Regards, --- Miguel Guirao Aguilera Logistica R8 TELCEL Tel. (999) 960.7994 Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Storing an array on a table?
Thanks to you all for your replies!! They are of great help --- Miguel Guirao Aguilera Logistica R8 TELCEL Tel. (999) 960.7994 -Original Message- From: Jordan Miller [mailto:[EMAIL PROTECTED] Sent: Jueves, 01 de Septiembre de 2005 10:28 a.m. To: [EMAIL PROTECTED] Cc: php-db@lists.php.net Subject: Re: [PHP-DB] Storing an array on a table? Yes, this has been mentioned in this thread. But with serialize/ unserialize, you can run into other problems that may be more confusing/difficult to troubleshoot. e.g.: http://www.php.net/serialize As you can see, the original array : $arr[20041001103319] = test after serialize/unserialize is: $arr[683700183] = test yepp, and i can explain it. the internal compiler of php does not hit anys rule wich foces him to make that number a string during serialisation. since it becomes an integer and php supports 32bit interger not arbitary bitwidth this is what happens: 20041001103319 equals hexadecimal: 0x123A28C06FD7h if you cut away the frontpart cutting down to 32bis, you get: 0x28C06FD7h wich equals 683700183. For simple arrays, I prefer storing everything as a simple imploded string. YMMV. Jordan On Sep 1, 2005, at 10:18 AM, [EMAIL PROTECTED] tg- [EMAIL PROTECTED] wrote: Sorry, didn't catch this thread from the beginning, but did anyone recommend trying the serialize() and unserialize() commands? They'll convert the array to a block of text that can be stored, retrieved and unserialized. My gut instinct is that if you're trying to store any array in a database, you may not have thought through your design very well. BUT.. I also know that there are cases where you might want to (I've actually done it before... being lazy in that case..hah) so dont take that as criticism, just wondering if there's a more right way to do it. If that's what you need to do though, definitely check out serialize (unless someone knows something I don't). Serialize() should do essentially what's being proposed below, just without having to figure out what string may not be in your array. good luck! -TG = = = Original message = = = if you just have a simple array with automatic numeric keys and text you could just implode the data to a string with a separator not found in your data: $dataArray = array(hello, goodbye, etc.); $storable = implode(, $dataArray); // $storable becomes hellogoodbyeetc. //then, use explode to get the original array back again $dataArray = explode(, $storable); you could use a similar technique if you want to put the keys in as well, albeit slightly more complicated (e.g. use to separate each element in the array and || to separate each key from its value). Just find a divider you know your data will not contain, such as a pipe: |. This has worked well for me. Jordan On Sep 1, 2005, at 8:55 AM, Miguel Guirao wrote: I want to store an array into a field on a MySQL table, Is it posible to save it? Maybe into a string field? ___ 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 Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail
RE: [PHP-DB] mysql_connect($server,$user,$password);
Remember that PHP is a server-side scripting language, so all PHP code is parsed at the server side and you will never see the code but the results, second, the .php files should have permissions that do not allow direct acces to them, but thru the web browser!! So, basically there is no problem with those parameters used to connect to the DB Chicolinux -Original Message- From: Chuck Han [mailto:[EMAIL PROTECTED] Sent: Miércoles, 27 de Julio de 2005 03:41 p.m. To: php-db@lists.php.net Subject: [PHP-DB] mysql_connect($server,$user,$password); Much of the password discussion I've seen revolves around encrypting the user-supplied password, but what about the user/password used to make the initial connection? In other words, I'm assuming that the .php file has the initial user and password right in the text in order to make the connection. Is there a way around this, because it seems very insecure to me that these parameters would be in the .php source. Or is the .php source supposedly not readable? thanks, Chuck -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] show tables
there are a set of functions that you should use in order to get the names of the tables, for short, this is the function that you should use: mysql_field_name() But again, you have to use this function along with other functions that list all the tables in a DB. Chicolinux -Original Message- From: blackwater dev [mailto:[EMAIL PROTECTED] Sent: Martes, 28 de Junio de 2005 08:43 a.m. To: php-db@lists.php.net Subject: [PHP-DB] show tables How can I run a query to find all of the tables in a db with a certain columname? Thanks! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Letters loop
Thanks!! I think the ord() function should receive an integer as a parameter and it returns it's corresponding character. But it will work!!! -Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Jueves, 26 de Mayo de 2005 08:28 a.m. To: [EMAIL PROTECTED]; php-db@lists.php.net Subject: RE: [PHP-DB] Letters loop try for ($i =ord( 'A'); $i = ord('Z'); $i++){ // code } bastien From: MIGUEL ANTONIO GUIRAO AGUILAR [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] Letters loop Date: Wed, 25 May 2005 20:37:47 -0700 Hi!! I wanna a do a for loop with letters, Is this possible? for ($i = 'A'; $i = 'Z'; $i++){ // code } -- MIGUEL GUIRAO AGUILERA Logistica R8 - Telcel Tel: (999) 960.7994 Cel: 9931-6 -- 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 : Subject: Letters loop
This a better and small aproach!!! Thanks!!! -Original Message- From: Neil Smith [MVP, Digital media] [mailto:[EMAIL PROTECTED] Sent: Jueves, 26 de Mayo de 2005 07:35 a.m. To: php-db@lists.php.net Cc: [EMAIL PROTECTED] Subject: [PHP-DB] RE : Subject: Letters loop for ($i=1; $i=26; $i++) { print(chr(64+$i)); } chr() prints the ASCII character corresponding to that number. Upper case A-Z starts at 64 : http://www.lookuptables.com Cheers - Neil Date: Wed, 25 May 2005 20:37:47 -0700 From: MIGUEL ANTONIO GUIRAO AGUILAR [EMAIL PROTECTED] To: php-db@lists.php.net Message-id: [EMAIL PROTECTED] MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Subject: Letters loop Hi!! I wanna a do a for loop with letters, Is this possible? for ($i = 'A'; $i = 'Z'; $i++){ // code } -- MIGUEL GUIRAO AGUILERA Logistica R8 - Telcel Tel: (999) 960.7994 Cel: 9931-6 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 Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Limiting Results
I believe you need a main table where youn list all the colleges with columns for STATE, CONGRESSIONAL DISTRICT and REPRESENTATIVE. And those three columns would be pulled from three table catalogs: STATES, CONGRESSIONAL DISTRICTS and REPRESENTATIVES. Maybe there is a better approach, but I don't know the way your states or country is organized. Miguel -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Jueves, 19 de Mayo de 2005 07:13 a.m. To: php-db@lists.php.net Subject: [PHP-DB] Limiting Results I am trying to limit results pulled from two tables, each with all states and congressional districts, to specified congressional districts. I want each college to appear once matched to each congressional district (that is in one table and is easy to do) and also include a column from a second table with the Representative. My syntax, below, produces far too many results, matching college and district and Representative many times. The syntax: select a.college, a.state, a.cd, b.rep from a, b where a.state = al and a.cd = 3 or a.state = az and a.cd = 1 and a.state = b.state and a.cd = b.cd What do I do to limit to single match for each college in the specified congressional districts? Ken -- 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] INSER INTO not working!
Acctually my problem was in that I was using the name of the table in uppercase rather than in lowercase. So MySQL was looking for table REV instead of rev. So for MySQL, REV and rev are very different tables!! Regards, Miguel Guirao -Original Message- From: Constantin Brinzoi [mailto:[EMAIL PROTECTED] Sent: Jueves, 12 de Mayo de 2005 05:11 a.m. To: Mihai Frisan Cc: MIGUEL ANTONIO GUIRAO AGUILAR; PHP Subject: Re: [PHP-DB] INSER INTO not working! Please, take into consideration that in Postgresql you have to quote table name if there are capitals in the name. Thus, if the table name is REV then you have to quote it like: $sqlstring = INSERT INTO \REV\ (revision) VALUES ($revision); Aurel On Thu, 2005-05-12 at 11:09 +0300, Mihai Frisan wrote: Hi, try $sqlstring = INSERT INTO REV (revision) VALUES ($revision); Mihai MIGUEL ANTONIO GUIRAO AGUILAR wrote: Hi list, I'm trying to store a data into a two-column table (id, revision). ID is auto_increment. My table is called REV. I'm using this query: $sqlstring = INSERT INTO REV VALUES('',$revision); Using that same query in mysql command line works pretty good and the row is added to the table, but is not working from my PHP page. I echo the $sqlstring variable for troubleshooting and it is correct. I'm using mysql_query($sqlstring, $link); Any ideas?? -- MIGUEL GUIRAO AGUILERA -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ** IMPORTANT NOTICE This communication is for the exclusive use of the intended recipient(s) named above. If you receive this communication in error, you should notify the sender by e-mail or by telephone (+44) 191 224 4461, delete it and destroy any copies of it. This communication may contain confidential information and material protected by copyright, design right or other intellectual property rights which are and shall remain the property of Piranha Studios Limited. Any form of distribution, copying or other unauthorised use of this communication or the information in it is strictly prohibited. Piranha Studios Limited asserts its rights in this communication and the information in it and reserves the right to take action against anyone who misuses it or the information in it. Piranha Studios Limited cannot accept any liability sustained as a result of software viruses and would recommend that you carry out your own virus checks before opening any attachment. GWAVAsigAdmID:04E590DF442906DF47024583032E9F69 ** IMPORTANT NOTICE This communication is for the exclusive use of the intended recipient(s) named above. If you receive this communication in error, you should notify the sender by e-mail or by telephone (+44) 191 224 4461, delete it and destroy any copies of it. This communication may contain confidential information and material protected by copyright, design right or other intellectual property rights which are and shall remain the property of Piranha Studios Limited. Any form of distribution, copying or other unauthorised use of this communication or the information in it is strictly prohibited. Piranha Studios Limited asserts its rights in this communication and the information in it and reserves the right to take action against anyone who misuses it or the information in it. Piranha Studios Limited cannot accept any liability sustained as a result of software viruses and would recommend that you carry out your own virus checks before opening any attachment. GWAVAsig -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB]Emisor de respuesta automática: [PHP-DB] Showing the next entry
We need to see your script or at least the portion where you do the query to the database. In general, you need to concatenate your different case-note for a given student as the while cycle goes thru your fetch statement for such a given student. -- MIGUEL GUIRAO AGUILERA - Mensaje original - De: John R. Sims, Jr. [EMAIL PROTECTED] Fecha: Lunes, Mayo 16, 2005 6:06 pm Asunto: [PHP-DB] Showing the next entry Hi All, I have developed a script that allows me to select a students name from the client table and display the call information from the case_note table, but the report only shows the first available case_note for an individual. I want this script to display all entries for the specific client in the case_note table. Can anyone point me in the right direction. Keeping the faith in fatherhood John -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ** IMPORTANT NOTICE This communication is for the exclusive use of the intended recipient(s) named above. If you receive this communication in error, you should notify the sender by e-mail or by telephone (+44) 191 224 4461, delete it and destroy any copies of it. This communication may contain confidential information and material protected by copyright, design right or other intellectual property rights which are and shall remain the property of Piranha Studios Limited. Any form of distribution, copying or other unauthorised use of this communication or the information in it is strictly prohibited. Piranha Studios Limited asserts its rights in this communication and the information in it and reserves the right to take action against anyone who misuses it or the information in it. Piranha Studios Limited cannot accept any liability sustained as a result of software viruses and would recommend that you carry out your own virus checks before opening any attachment. GWAVAsigAdmID:58DF45836421CA73BB6821B8B0D98013 ** IMPORTANT NOTICE This communication is for the exclusive use of the intended recipient(s) named above. If you receive this communication in error, you should notify the sender by e-mail or by telephone (+44) 191 224 4461, delete it and destroy any copies of it. This communication may contain confidential information and material protected by copyright, design right or other intellectual property rights which are and shall remain the property of Piranha Studios Limited. Any form of distribution, copying or other unauthorised use of this communication or the information in it is strictly prohibited. Piranha Studios Limited asserts its rights in this communication and the information in it and reserves the right to take action against anyone who misuses it or the information in it. Piranha Studios Limited cannot accept any liability sustained as a result of software viruses and would recommend that you carry out your own virus checks before opening any attachment. GWAVAsig -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] multiple queries, one transaction
There is a function that gets the last auto increment value for an ID field!! -Original Message- From: mayo [mailto:[EMAIL PROTECTED] Sent: Martes, 17 de Mayo de 2005 10:27 a.m. To: php-db@lists.php.net Subject: [PHP-DB] multiple queries, one transaction I would like to get the itemID number (autoincrement) of the last insert. (Insert order, get last orderID number and use it elsewhere.) I'm having trouble understanding how to do a transaction in mysql/php Code below: $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); $dbname = 'mail'; mysql_query(BEGIN); // starts the transaction mysql_query($query) or die('Error, insert query failed'); mysql_query($query2) or die('Error, select query failed'); $query = INSERT INTO orders (orderDate) VALUES ('2005-05-17'); $query = SELECT max ordered FROM orders; mysql_query($query) or die('Error, insert query failed'); mysql_query($query2) or die('Error, update query failed'); mysql_query(COMMIT); // ends the transaction mysql_close($conn); ? thx -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] INSER INTO not working!
Acctually my problem was in that I was using the name of the table in uppercase rather than in lowercase. So MySQL was looking for table REV instead of rev. So for MySQL, REV and rev are very different tables!! Regards, Miguel Guirao -Original Message- From: Constantin Brinzoi [mailto:[EMAIL PROTECTED] Sent: Jueves, 12 de Mayo de 2005 05:11 a.m. To: Mihai Frisan Cc: MIGUEL ANTONIO GUIRAO AGUILAR; PHP Subject: Re: [PHP-DB] INSER INTO not working! Please, take into consideration that in Postgresql you have to quote table name if there are capitals in the name. Thus, if the table name is REV then you have to quote it like: $sqlstring = INSERT INTO \REV\ (revision) VALUES ($revision); Aurel On Thu, 2005-05-12 at 11:09 +0300, Mihai Frisan wrote: Hi, try $sqlstring = INSERT INTO REV (revision) VALUES ($revision); Mihai MIGUEL ANTONIO GUIRAO AGUILAR wrote: Hi list, I'm trying to store a data into a two-column table (id, revision). ID is auto_increment. My table is called REV. I'm using this query: $sqlstring = INSERT INTO REV VALUES('',$revision); Using that same query in mysql command line works pretty good and the row is added to the table, but is not working from my PHP page. I echo the $sqlstring variable for troubleshooting and it is correct. I'm using mysql_query($sqlstring, $link); Any ideas?? -- MIGUEL GUIRAO AGUILERA -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] novice on table design
The schema of your table is wrong, is you do bnormalize it you will find out that you need two tables for this approach. One table for your people and another one for the n addresses of your people. If you keep your current schema, you will have as many rows for one person as many addresses for that person you have, and you will be duplicating many fields. So you must split your tables, one for your people and another for your people's addresses. -Original Message- From: tony yau [mailto:[EMAIL PROTECTED] Sent: Viernes, 13 de Mayo de 2005 09:27 a.m. To: php-db@lists.php.net Subject: [PHP-DB] novice on table design Hi all, I have the following tables EmployeeCustomernon-CustomerAddress ======= pkey pkeypkey pkey number type type ... payrate grantcapital I need to allow the three types of people to have n addresses, so I've added a type to distinguish the 3 types of people and their respective pkey onto address table. Address = pkey ... type(either Employee, Customer or non-Customer etc) fkey(the pkey of Employee, Customer or non-Customer etc) I know this design looks awkward but it does have the advantage of having less tables otherwise. BUT somehow it doesn't feel right. Can someone points me its pros and cons. thanks all. Tony Yau -- 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] Drop Down Menus
Some body asked for it! -Original Message- From: chintan [mailto:[EMAIL PROTECTED] Sent: Jueves, 05 de Mayo de 2005 07:36 a.m. To: php-db@lists.php.net Subject: [PHP-DB] Drop Down Menus hey guys i wrote this code from another code of zend.php Can anyone tell me how do i update the value of second menu and third one? can i do that without javascript? ?php session_start(); header(Cache-control: private); $link = mysql_connect(localhost, chintan,hellomysql) or die(Could not connect); mysql_select_db(chintan) or die(Could not select database); $XX = No data availabe!; echo form name=HingeType action=$PHP_SELF method=POST; $_SESSION['ItemType'] = $_REQUEST['ItemType']; echo select name=ItemType tabindex=1; $aku = mysql_query(SELECT ItemType FROM Products WHERE ItemName='Hinges' group by ItemType); while ($row = mysql_fetch_array($aku)) { $colom_name=$row[ItemType]; echo option value=$colom_name$colom_name/option; } if ($colom_name=) { print ($XX); } echo /select;? input type=Submit value=Update onclick=Call Test_Click()br ?php echo $_SESSION['ItemType']; $_SESSION['Thickness'] = $_REQUEST['Thickness']; echo select name=Thickness tabindex=2\n; $ak = mysql_query(SELECT Thickness FROM Products WHERE ItemName='Hinges' and ItemType='$_SESSION[ItemType]' group by Thickness); while ($row = mysql_fetch_array($ak)) { $colom_name2=$row[Thickness]; echo option value=$colom_name2$colom_name2/option\n; } if ($colom_name2=) { print ($XX); } echo /select; echo input type=submit value='Update'br; echo $_SESSION['Thickness']; $_SESSION['SizeinMM'] = $_REQUEST['SizeinMM']; echo select name=SizeinMM tabindex=3\n; $ak = mysql_query(SELECT SizeinMM FROM Products WHERE ItemName='Hinges' and ItemType='$_SESSION[ItemType]' and Thickness='$_SESSION[Thickness]'); while ($row = mysql_fetch_array($ak)) { $colom_name3=$row[SizeinMM]; echo option value=$colom_name3$colom_name3/option\n; } if ($colom_name3=) { print ($XX); } echo /select\n; echo input type=submit value='Update'br\n; echo $_SESSION['SizeinMM']; echo /form; $ak = mysql_query(SELECT Rates,Ratesforsspin FROM Products WHERE ItemName='Hinges' and ItemType='$_SESSION[ItemType]' and Thickness='$_SESSION[Thickness]' and SizeinMM='$_SESSION[SizeinMM]'); while ($row = mysql_fetch_array($ak)) { $colom_name4=$row[Rates]; $colom_name5=$row[Ratesforsspin]; } echo brbRates for M.S.Pin:/b\t$colom_name4br; echo bRates for S.S.Pin:/b\t$colom_name5br; ? -- 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] Transfering post data to a series of pages. .
I agree!! -Original Message- From: Martin Norland [mailto:[EMAIL PROTECTED] Sent: Miércoles, 04 de Mayo de 2005 08:39 a.m. To: php-db@lists.php.net Subject: Re: [PHP-DB] Transfering post data to a series of pages. . Perry, Matthew (Fire Marshal's Office) wrote: Is there a way to transfer post data to a series of PHP pages? For example, lets say I have the following 4 pages: Page1.php - this page has my original post form Page2.php - this page does one thing with the post data Page3.php - this page does another thing with the post data Page4.php - this page shows the results of everything I have done Right now I am using the header: ?header(Location: page3.php);? The problem is, the following works: Page1.php - this page has my original post form Page2.php - this page does one thing with the post data Page3.php - this page shows the results of everything I have done But when I try to add the second transfer the data is lost: Page1.php - this page has my original post form Page2.php - this page does one thing with the post data Page3.php - this page does another thing with the post data Page4.php - Only the results from Page2.php are shown ASP does this with %Server.Transfer (transferpage1.asp)% Is there a counterpart with PHP? - Matthew include() :P seriously though, Page1.php and Page4.php are the only two pages that should exist, if any. Page2 and Page3 should pretty much guaranteed be turned into function calls or classes and called from Page4.php. You don't need to separate logic and display in separate scripts that you push everything at, just separate your logic out into function calls. cheers, -- - Martin Norland, Sys Admin / Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -- 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 Using Sessions
Why dont'n you use soma classes from www.phpclasses.com about User Management!! There are great classes in this site!! -Original Message- From: Shawn Singh [mailto:[EMAIL PROTECTED] Sent: Miércoles, 04 de Mayo de 2005 03:14 p.m. To: php-db@lists.php.net Subject: [PHP-DB] Problem Using Sessions Hey All, I'm fairly new to PHP Programming. I have compiled and installed postgres version 8.0.1, and with that compiled postgres support into my postgres (I'm using PHP version 5.0.4), and I've compiled support for PHP into Apache (version 2.0.53) and all is working (in that I can embed PHP into my HTML documents and get the expected results). Recently I started working on a website in which I would like there to be an administration page where the person who is logged in can add and delete records. I figured that the best way to do this would be to establish a session, (at the login page) then if the user login is successful, I would then register the username and password and redirect the user to the admin page. I chose not to use cookies, b/c everyone may not have cookies enabled on their browser and I didn't want that to be a hurdle that a user would have to jump over. I've written the code but when I try to login to the site I get this message: Warning: Cannot modify header information - headers already sent by (output started at /export/home/www/htdocs/login.php:13) in /export/home/www/htdocs/login.php on line 25 Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0 Information I've seen on the web for these types of messages would indicate that I don't have a /tmp directory, but such is not the case. Other messages have indicated that my session variables are not getting written to /tmp, but that is not true either, as I have seen them in there...as I see entries such as: sess_ec2249332b8b29863f161461cf8c1409 So, I'm guessing that there aren't problems with my /tmp filesystem. Please excuse the lack of style as I have mainly been trying to hack out something, but plan to clean it up later. My source code for the login page is as follows: ?php session_start(); echo html titleJoshua Generation Login Page/title body bgcolor='#9C9C9C' form action='login.php' method='POST' table border='1' trtdEnter Username:/tdtdinput type='text' name='username'/td/tr trtdEnter Password:/tdtdinput type='text' name='password'/td/tr input type='hidden' name='login' value='1' input type='submit'value='Login' /table /form; if ( $_POST ) { $username = $_POST['username']; $password = $_POST['password']; if ( $username == test $password == test ) { global $username, $password; session_register(username); session_register(password); echo h1Authorized Entry/h1; header(Location: http://joshua1and8.homelinux.org/admin.php;); } else { echo $username; echo br; echo $password; echo br; echo h1Login FAILED/h1; } } echo /body /html; ? My source code for the admin page is as follows: ?php session_start(); global $username, $password; session_register(username); session_register(password); ? html head titleJoshua Generation Admin Page/title /head body bgcolor='#9C9C9C' ?php /* * Radesh N. Singh * Admin Page */ if (isset($username)) { echo h1Joshua Generation Admin's Corner/h1 form action=\admin.php\ method=\POST\ table border=\1\ trtdName/td tdCell Phone/td tdWork Phone/td tdHome Phone/td tdEmail Address/td /tr trtdinput type=\text\ name=\name\//td tdinput type=\text\ name=\cphone\//td tdinput type=\text\ name=\wphone\//td tdinput type=\text\ name=\hphone\//td tdinput type=\text\ name=\emailaddr\//td /tr trinput type=\hidden\ name=\proc\ value=\add\ input type=\submit\ value=\Add Member Records\ input type=\hidden\ name=\proc\ value=\del\ input type=\submit\ value=\Delete Member Records\ /tr /table /form; if ($_POST) { $conn_string = dbname=joshua_generation user=admin password=admin; $conn_hndl = pg_connect($conn_string); switch ($_POST['proc']) { case 'add': $name = $_POST['name']; $cphone = $_POST['cphone']; $wphone = $_POST['wphone']; $hphone = $_POST['hphone']; $emailaddr = $_POST['emailaddr']; /* To add a member a name is all that is needed. Based on the name that is entered, the next nameid
[PHP-DB] List-Unsubscribe
Miguel Guirao Servicios Datacard www.SIASA.com.mx -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Enviado el: Viernes, 21 de Mayo de 2004 12:04 p.m. Para: [EMAIL PROTECTED] Asunto: WELCOME to php-db@lists.php.net Hi! This is the ezmlm program. I'm managing the php-db@lists.php.net mailing list. I'm working for my owner, who can be reached at [EMAIL PROTECTED] Acknowledgment: I have added the address [EMAIL PROTECTED] to the php-db mailing list. Welcome to [EMAIL PROTECTED] Please save this message so that you know the address you are subscribed under, in case you later want to unsubscribe or change your subscription address. --- Administrative commands for the php-db list --- I can handle administrative requests automatically. Please do not send them to the list address! Instead, send your message to the correct command address: For help and a description of available commands, send a message to: [EMAIL PROTECTED] To subscribe to the list, send a message to: [EMAIL PROTECTED] To remove your address from the list, just send a message to the address in the ``List-Unsubscribe'' header of any list message. If you haven't changed addresses since subscribing, you can also send a message to: [EMAIL PROTECTED] or for the digest to: [EMAIL PROTECTED] For addition or removal of addresses, I'll send a confirmation message to that address. When you receive it, simply reply to it to complete the transaction. If you need to get in touch with the human owner of this list, please send a message to: [EMAIL PROTECTED] Please include a FORWARDED list message with ALL HEADERS intact to make it easier to help you. --- Enclosed is a copy of the request I received. Return-Path: [EMAIL PROTECTED] Received: (qmail 34046 invoked by uid 1010); 21 May 2004 17:03:38 - Delivered-To: ezmlm-scan-php-db-sc.1085158340.fomodoacgcmabpfgfgbc-mguirao=acrosoft.ne [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] ts.php.net Received: (qmail 33809 invoked from network); 21 May 2004 17:03:37 - Received: from unknown (HELO acrosoft.net) (128.121.125.129) by pb1.pair.com with SMTP; 21 May 2004 17:03:37 - Received: from Guirao (dsl-200-78-8-135.prod-infinitum.com.mx [200.78.8.135]) by acrosoft.net (8.12.11/8.12.6) with ESMTP id i4LH3ZGF034541 for [EMAIL PROTECTED] p.net; Fri, 21 May 2004 11:03:36 -0600 (MDT) From: Miguel Guirao [EMAIL PROTECTED] To: [EMAIL PROTECTED] p.net Subject: RE: confirm subscribe to php-db@lists.php.net Date: Fri, 21 May 2004 12:04:24 -0500 Organization: SIASA Message-ID: [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 In-Reply-To: [EMAIL PROTECTED] Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] sending e-mails
Hi!! I have a script in PHP that should send an e-mail from a specific e-mail account, let's say mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] to a customer's e-mail account, using the smtp_mail.inc class of PHP. But, Do I need to authenticate first in order to send the e-mail? If so, how? Best Regards, Miguel Guirao Servicios Datacard www.SIASA.com.mx
[PHP-DB] Array
Hi!! I have a table with many options from when the user can select them, after that, his/her selections will be stored in a database. In the mean time, I want to store his/her selections in an array like this one: PN DescQty |---|--|---| |---|--|---| |---|--|---| How do I declare Duch an array like this??, let's call it Parts. Miguel Guirao Servicios Datacard www.SIASA.com.mx -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Checkboxes in a table
Hi!! I'm dinamically building a table, within a while cycle a build each row with it's columns. One of these columns contains a checkbox, so I have as many checkboxes as many rows. So, after hitting Submit I wanna know which checkboxes has been selected, I'm naming each of them like this: checkbox[n], where n=1 is for the first row and so on. So, my question is, upon receiving all the variables in the second script, if I navigate thru each of the elements, I will see which one is selected and which one is not? Am I all right?? Miguel Guirao Servicios Datacard www.SIASA.com.mx
RE: [PHP-DB] Dropdown menus from DB query
Actually is named a Scape Character Miguel Guirao Servicios Datacard www.SIASA.com.mx -Mensaje original- De: Cole Ashcraft [mailto:[EMAIL PROTECTED] Enviado el: Viernes, 18 de Junio de 2004 11:06 a.m. Para: [EMAIL PROTECTED] Asunto: Re: [PHP-DB] Dropdown menus from DB query No, the \ (backslash) tells PHP to echo the . This prevents PHP from thinking that the quote means the end of an echo statement. Cole Shahmat Bin Dahlan wrote: I think this is the line which is the cause of your coding woes... The quote () doesn't have any matching pair. There's one quote in front, but there's none at the back. echo select name=\dropdown\; * * - Original Message - From: Cole Ashcraft [EMAIL PROTECTED] Date: Friday, June 18, 2004 9:23 am Subject: Re: [PHP-DB] Dropdown menus from DB query Thanks. I think I can work from this. Just to let you know, it generatesa parse error ( I think its because of the quotes). Cole On Thu, 2004-06-17 at 18:09, Ng Hwee Hwee wrote: hmm... what about something like this?? echo select name=\dropdown\; $query = select code, name from table; $result = mysql_query($query); while($array = mysql_fetch_array($result)) { echo option value=\.$array[code].\.$array[name]./option; } echo /select; hth - Original Message - From: Cole Ashcraft [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 18, 2004 7:50 AM Subject: [PHP-DB] Dropdown menus from DB query How would you create a drop down menu from a database query? I have figured how to do it with one field, but how could it be done with a system where the value is different than the displayed value (ie. numerical code as the value, name displayed)? Thanks, Cole -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- 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: Anyone using MSQL Server with PHP?
Thanks a lot Hans for your great explanation about this type of passwords, salted passwords. I will google for that term, time-memory Tradeoff. Thanks one more time!! Miguel Guirao Servicios Datacard www.SIASA.com.mx -Mensaje original- De: Hans Lellelid [mailto:[EMAIL PROTECTED] Enviado el: Viernes, 11 de Junio de 2004 12:15 a.m. Para: Miguel Guirao CC: 'Justin Patrin'; [EMAIL PROTECTED] Asunto: Re: [PHP-DB] Re: Anyone using MSQL Server with PHP? Hi Miguel, I would also strongly suggest that you use a salted hash if you are concerned with security -- especially if that md5 could ever be compromised or pass in clear text over an internet connection. The md5() function in PHP produces unsalted hashes, which are fairly easy to crack. Unlike md5(), the PHP crypt() function will generate salted hashes. On my windows system it creates salted MD5 hashes (other operating systems may have other options like SHA1). A salt is essentially an additional random element that gets added into the password hash. This means that unlike md5() you will get a different hash each time you run crypt() on an identical string: crypt(hello) = $1$bJoW4DmS$GDNwsRSjd5rwkfra6KOh10 crypt(hello) = $1$DnL7LQXm$eioj87M92X3IQvoTEquY21 crypt(hello) = $1$h488/RAa$e8tA4K1hEuBBRnagJbBnV1 instead of: md5(hello) = 5d41402abc4b2a76b9719d911017c592 md5(hello) = 5d41402abc4b2a76b9719d911017c592 md5(hello) = 5d41402abc4b2a76b9719d911017c592 Why does this matter? Well, because of something called the time-memory tradeoff (try a google search to see the math behind this). The basic principle of the time-memory tradeoff is that you could either spend a long time trying to brute force each password hash or you could just spend time once creating really big (memory) tables that contain all the possibilities and then crack a hashed password in seconds. Of course the more complex the passwords you want to crack the longer it takes to build these tables (could be days, weeks, months, etc.), but the idea is that once you've built these tables it only takes a few seconds to crack any supported password. Time-memory tradeoff only works with unsalted passwords because these are 100% predicatble (hash of unsalted MD5 is always the same, as seen above). To check an entered password against the original when using salted hashes, you need to do something a little different: you have to pass the original encrypted password as the salt to the crypt() function (the crypt() function extracts the salt from the passed password and uses that same salt to encrypt the entered password). For example in PHP, check entered password against real password like this: if (crypt($entered_pw, $real_pw) == $real_pw) { // login success } Hope that helps. (Anyone, please correct any errors or misinformation above!) Hans Miguel Guirao wrote: Thanks!! It Works out pretty nice!! Miguel Guirao Servicios Datacard www.SIASA.com.mx -Mensaje original- De: Justin Patrin [mailto:[EMAIL PROTECTED] Enviado el: Jueves, 10 de Junio de 2004 05:51 p.m. Para: [EMAIL PROTECTED] Asunto: [PHP-DB] Re: Anyone using MSQL Server with PHP? Miguel Guirao wrote: Hi!! Anybody here using PHP with SQL Server? I would like to use a similar function to password () from MySQL under SQL Server. Anybody knows of a similar function under SQL Server? Kind Regards, Miguel Guirao Servicios Datacard www.SIASA.com.mx If it's for your app only, you could use md5() in 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-DB] password () function.
Is this function, password() available at PHP Ander Windows? I get an undefinied function error message! Miguel Guirao Servicios Datacard www.SIASA.com.mx -Mensaje original- De: James Harrell [mailto:[EMAIL PROTECTED] Enviado el: Jueves, 10 de Junio de 2004 09:50 a.m. Para: Philip Thompson; [EMAIL PROTECTED] Asunto: RE: [PHP-DB] HTTP header information Hi Philip, You'll probably want to move your session handling code to the top of the main entry point of your application, rather than starting it in a sub-page. This way all subpages get the benefit of being able to use the session data. Even if not strictly necessary, the option is there in the event you add features later on that require sessions throughout the application. A possible alternative is to use output buffering, which allows you to start a session even after output has been sent. Though this is more likely a kludge rather than a good solution to the problem. James -Original Message- From: Philip Thompson [mailto:[EMAIL PROTECTED] Sent: Thursday, June 10, 2004 9:46 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] HTTP header information Hi all. I am running a website to where a user needs to login to authenticate themselves to perform certain tasks. So a user logs in, and I start a session (in PHP, of course). Well, the catch is, I am doing this all from one page, 'viewer.php', and I just tack on the specific view/page that I want them to see, depending on the link selected on that page. Meaning, they click on the 'submit problem' link and it goes to 'viewer.php?type=submitproblem'. The problem comes whenever I load the view 'submitproblem' and I start a session with session_start(), which carries over the variable to tell whether or not the user is logged in. If they have not logged in whenever they click on 'submitproblem' then it will redirect them to 'viewer.php?type=login'. So I log in, and then go to 'submitproblem'. This is where I get the error: Warning: session_start(): Cannot send session cookie - headers already sent. Essentially, I understand why this is occurring, but is there an easy way to get around it without creating a new page, such as 'submitproblem.php' instead of 'viewer.php?type=submitproblem'??? Thanks a bunch ~Philip -- 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] password () function.
OK, now I understand why it doesn't works under SQL Server.!! Thanks! P.S. Yes, I do hijacked someone else's thread. I won't do it again! THANKS! Miguel Guirao Servicios Datacard www.SIASA.com.mx -Mensaje original- De: Larry E. Ullman [mailto:[EMAIL PROTECTED] Enviado el: Jueves, 10 de Junio de 2004 10:13 a.m. Para: Miguel Guirao CC: [EMAIL PROTECTED] Asunto: Re: [PHP-DB] password () function. Is this function, password() available at PHP Ander Windows? I get an undefinied function error message! There is no PASSWORD() function in PHP. There is, however, a PASSWORD() function in MySQL and other database applications. Larry PS It looks like you hijacked someone else's thread, which you shouldn't do. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Anyone using MSQL Server with PHP?
Hi!! Anybody here using PHP with SQL Server? I would like to use a similar function to password () from MySQL under SQL Server. Anybody knows of a similar function under SQL Server? Kind Regards, Miguel Guirao Servicios Datacard www.SIASA.com.mx
RE: [PHP-DB] Re: Anyone using MSQL Server with PHP?
Thanks!! It Works out pretty nice!! Miguel Guirao Servicios Datacard www.SIASA.com.mx -Mensaje original- De: Justin Patrin [mailto:[EMAIL PROTECTED] Enviado el: Jueves, 10 de Junio de 2004 05:51 p.m. Para: [EMAIL PROTECTED] Asunto: [PHP-DB] Re: Anyone using MSQL Server with PHP? Miguel Guirao wrote: Hi!! Anybody here using PHP with SQL Server? I would like to use a similar function to password () from MySQL under SQL Server. Anybody knows of a similar function under SQL Server? Kind Regards, Miguel Guirao Servicios Datacard www.SIASA.com.mx If it's for your app only, you could use md5() in PHP. -- paperCrane Justin Patrin -- 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] Undefined variable
Hi!! I have a very simple and smail script with just one input text box and a submit button. After that, I have an echo function in the same code page that just displays the data entered in the text box. But I'm receiving an undefinied variable error when I execute it!! Echo ($Name); I'm using Windows 2000 Server and PHP for Windows. Regards, Miguel Guirao Servicios Datacard www.SIASA.com.mx
RE: [PHP-DB] Undefined variable
Thanks so much!!! Miguel Guirao Servicios Datacard www.SIASA.com.mx -Mensaje original- De: Viorel Dragomir [mailto:[EMAIL PROTECTED] Enviado el: Miércoles, 26 de Mayo de 2004 09:55 a.m. Para: Miguel Guirao; PHP DB List Asunto: Re: [PHP-DB] Undefined variable echo $_REQUEST['Name']; - Original Message - From: Miguel Guirao To: PHP DB List Sent: Wednesday, May 26, 2004 17:47 Subject: [PHP-DB] Undefined variable Hi!! I have a very simple and smail script with just one input text box and a submit button. After that, I have an echo function in the same code page that just displays the data entered in the text box. But I'm receiving an undefinied variable error when I execute it!! Echo ($Name); I'm using Windows 2000 Server and PHP for Windows. Regards, Miguel Guirao Servicios Datacard www.SIASA.com.mx -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] undefined function
OK, I added it!! But it still does work. BTW, I have four different PHP.ini files in my system, where I can see which one is using it? I added it to all of them!! IIS PHP 4.x SQL Server Miguel Guirao Servicios Datacard www.SIASA.com.mx -Mensaje original- De: Bruno Ferreira [mailto:[EMAIL PROTECTED] Enviado el: Viernes, 21 de Mayo de 2004 05:01 p.m. Para: [EMAIL PROTECTED] Asunto: Re: [PHP-DB] undefined function Miguel Guirao wrote: First, I do not have that line in my php.ini file. In what section should I add it? Anywhere, but best place as long as organization is concerned would be under the Dynamic extensions label. Bruno Ferreira PS - You should check the default php.ini that comes with your PHP distribution and customize from there. --- [This E-mail scanned for viruses by Declude Virus] -- 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] undefined function
Thank you everybody!! I was missing that bloody dll. Is working now!!! Best Regards, and thanks again Miguel Guirao Servicios Datacard www.SIASA.com.mx -Mensaje original- De: John W. Holmes [mailto:[EMAIL PROTECTED] Enviado el: Lunes, 24 de Mayo de 2004 01:06 p.m. Para: Miguel Guirao; 'Bruno Ferreira'; [EMAIL PROTECTED] Asunto: Re: [PHP-DB] undefined function From: Miguel Guirao [EMAIL PROTECTED] BTW, I have four different PHP.ini files in my system, where I can see which one is using it? I added it to all of them!! phpinfo() will product a page that shows you what php.ini file PHP is using. It's in the first block. ---John Holmes... -- 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] undefined function
I'm receiving this error: Fatal error: Call to undefined function: mssql_connect() in e:\inetpub\wwwroot\sitio\TMP5w3gxy2pnf.php on line 9 This is line 9:if (!( $con = mssql_connect($maquina, $usuario, $password))) $maquina = SERVIDOR; $usuario = sa; $password = ; $BDnombre = ProyectoRMA; So, basically, any ideas of the source of this error? Regards, Miguel Guirao Servicios Datacard www.SIASA.com.mx
RE: [PHP-DB] undefined function
First, I do not have that line in my php.ini file. In what section should I add it? I forgot, I'm using Windows 2000 Server, SQL Server, PHP4 and coding in DreamweaverMX Miguel Guirao Servicios Datacard www.SIASA.com.mx -Mensaje original- De: Bruno Ferreira [mailto:[EMAIL PROTECTED] Enviado el: Viernes, 21 de Mayo de 2004 02:39 p.m. Para: [EMAIL PROTECTED] Asunto: Re: [PHP-DB] undefined function Miguel Guirao wrote: I'm receiving this error: Fatal error: Call to undefined function: mssql_connect() in e:\inetpub\wwwroot\sitio\TMP5w3gxy2pnf.php on line 9 This is line 9:if (!( $con = mssql_connect($maquina, $usuario, $password))) $maquina = SERVIDOR; $usuario = sa; $password = ; $BDnombre = ProyectoRMA; So, basically, any ideas of the source of this error? Probably the mssql extension isn't loaded. Open the php.ini file and see that the line reading extension=php_mssql.dll isn't commented out. Things should go back to normal. Bruno Ferreira --- [This E-mail scanned for viruses by Declude Virus] -- 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