RE: [PHP-DB] Variables de SESSION dentro de funciones PHP
through the magic of babelfish! I have a function in PHP that reads of a file a configuration to me of BBDD tables, I want that the name of the tables as well as the data of connection, I have left residents in session variables. When registry the variables within the function, when acceding from any other point with $$HTTP_SESSION_VARS[nombrevariable ] puts to me because she is empty. somebody could clarify the treatment to me of these variables in PHP? Greetings and thank you very much. (just in case he can't speak English!) -Original Message- From: Ruprecht Helms [mailto:[EMAIL PROTECTED]] Sent: 13 December 2002 12:32 To: Francisco José Saiz :@mayn.de: netPerceptions Cc: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Variables de SESSION dentro de funciones PHP Hi Francisco José Saiz netPerceptions, would you be so kind and repeat your mail in english. Regards, Ruprecht -- Ruprecht Helms IT-Service und Softwareentwicklung Tel/Fax.: +49[0]7621 16 99 16 Homepage: http://www.rheyn.de email: [EMAIL PROTECTED] -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ This message has been checked for all known viruses by the MessageLabs Virus Control Centre. This message has been checked for all known viruses by the MessageLabs Virus Control Centre. * Notice: This email is confidential and may contain copyright material of Ocado Limited (the Company). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company. If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses. Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY * -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] MySQL Problem
Maybe I'm missing something - but the MySQL statement looks right ... How are you displaying the results? -Original Message- From: Griffiths, Daniel [mailto:[EMAIL PROTECTED]] Sent: 21 November 2002 16:37 To: PHP List Subject: [PHP-DB] MySQL Problem Hi, I have a problem with an MySQL statement that is driving me mad, I'm using php to connect to the database. this is it : - SELECT LINE,SUM(IF(MONTH=2,WB.TEU,0)) AS '2' ,SUM(IF(MONTH=3,WB.TEU,0)) AS '3' ,SUM(IF(MONTH=4,WB.TEU,0)) AS '4' ,SUM(IF(MONTH=5,WB.TEU,0)) AS '5' ,SUM(IF(MONTH=6,WB.TEU,0)) AS '6' ,SUM(IF(MONTH BETWEEN 2 AND 6,WB.TEU,0)) AS '2 TO 6' FROM WB WHERE EAST_PORT='A' AND WEST_PORT='B' GROUP BY LINE what I want to produce with this is this : - LINE2 3 4 5 6 2 TO 6 A 133511181260139512766384 B 432 469 451 480 555 2387 C 504 554 575 517 764 2914 however what I get is this : - LINE2 3 4 5 6 2 TO 6 A 111812601395127663846384 B 469 451 480 555 23872387 C 554 575 517 764 29142914 the last column of figures (2 TO 6) has been replicated under 6 and pushed the values that were in 6 into 5 and so on! I can not see for the life of me why this should or could be happening, especially as the equivalent code in MS Access : - SELECT LINE, Sum(IIf(MONTH=2,TEU,0)) AS ['2'], Sum(IIf(MONTH=3,TEU,0)) AS ['3'], Sum(IIf(MONTH=4,TEU,0)) AS ['4'], Sum(IIf(MONTH=5,TEU,0)) AS ['5'], Sum(IIf(MONTH=6,TEU,0)) AS ['6'], SUM(IIF(MONTH BETWEEN 2 AND 6,TEU,0)) AS 'FEB TO JUNE' , SUM(IIF(MONTH BETWEEN 1 AND 6,TEU,0)) AS 'YTD' FROM DUMP WHERE (((DUMP.[EAST PORT])='HONG KONG') AND ((DUMP.[WEST PORT])='UK')) GROUP BY DUMP.LINE; gives the correct results. If anyone has any idea of what is going on here please let me know, I'm hoping its something simple I'm missing.. Thanks Dan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ This message has been checked for all known viruses by the MessageLabs Virus Control Centre. This message has been checked for all known viruses by the MessageLabs Virus Control Centre. * Notice: This email is confidential and may contain copyright material of Ocado Limited (the Company). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company. If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses. Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY * -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] select statement
What's the error? -Original Message- From: Steve Dodkins [mailto:Steve.Dodkins;ebm-ziehl.co.uk] Sent: 25 October 2002 16:46 To: Php-Db (E-mail) Subject: [PHP-DB] select statement Hi I get an error message with the following statement, if I remove the 'AND works_order_part_no=parts_parts_no' I don't get an error message but also get the wrong data ?? $link = mysql_connect($host, $user, $pass); mysql_select_db(DB_EDMsystem, $link); $result = mysql_query(SELECT * FROM labor, works_orders, parts where labor_ord_no = works_orders_ord_no AND works_order_part_no = parts_parts_no,$link); echo TABLE BORDER=2; echoTRTDBWorks Order/BTDBPart Number/BTDBOrder Qty/BTDBMade Qty/BTDBOptionsTRTD; while($myrow = mysql_fetch_array($result)) Regards Steve Dodkins IMPORTANT NOTICE The information in this e-mail is confidential and should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. ebm-ZIEHL (UK) Ltd. cannot accept any responsibility for the accuracy or completeness of this message as it has been transmitted over a public network. Furthermore, the content of this e-mail is the personal view of the sender and does not represent the advice, views or opinion of our company. Accordingly, our company disclaim all responsibility and accept no liability (including in negligence) for the consequences of any person acting, or refraining from acting, on such information prior to the receipt by those persons of subsequent written confirmation. In particular (but not by way of limitation) our company disclaims all responsibility and accepts no liability for any e-mails which are defamatory, offensive, racist or in any other way are in breach of any third party's rights, including breach of confidence, privacy or other rights. If you have received this e-mail message in error, please notify me immediately by telephone. Please also destroy and delete the message from your computer. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message is strictly prohibited. If you have received this E-mail in error, or suspect that the message may have been intercepted or amended, please notify ebm-ZIEHL (UK) Ltd on +44(0)1245 468555. ebm-ZIEHL (UK) Ltd Chelmsford Business Park, Chelmsford, Essex CM2 5EZ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ This message has been checked for all known viruses by the MessageLabs Virus Control Centre. This message has been checked for all known viruses by the MessageLabs Virus Control Centre. * Notice: This email is confidential and may contain copyright material of Ocado Limited (the Company). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company. If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses. Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY * -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] whats wrong with my sql insert statement?
Hi there, Two things: (a) in my experience - you should use single quotes in your query to surround the values and so you don't need to escape them either (e.g. '$first_name') and (b) Make sure register_globals is on - otherwise you need to use $_POST[first_name] Cheers, Michael. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 10 September 2002 01:15 To: [EMAIL PROTECTED] Subject: [PHP-DB] whats wrong with my sql insert statement? Hi I am using redhat 7.3 with mysql-3.23.49-3 php-4.1.2-7.3.4 apache-1.3.23-11. I want to insert few values into a mysql table. This input.php sort works. it will add a new entray to the table but with blank values. What did I do wrong? # # # file name input.php ?php $db_name =cheese_catalog; $table_name = user; $connection = @mysql_connect(localhost,test,test) or die(Couldn't Connect.); $db = @mysql_select_db($db_name, $connection) or die(Couldn't select database.); if (none_required==none_required) { $sql = INSERT INTO $table_name (first_name,location,phone,messages) VALUES (\$first_name\,\$location\,\$phone\, \$messages\);; $result = @mysql_query($sql, $connection) or die(Error #. mysql_errno() . : . mysql_error()); include(input_added.html); } ? # # file name input.html # html head titleNew Record/title /head body pPlease fill out the following information:/p form method=post action=input.php enctype=multipart/form-data table width=100% border=0 cellspacing=3 cellpadding=3 tr td width=25%first_name:/td td width=75%input name=first_name type=text size=40 maxlength=255 value=/td /tr tr td width=25%location:/td td width=75%input name=location type=text size=40 maxlength=255 value=/td /tr tr td width=25%phone:/td td width=75%input name=phone type=text size=40 maxlength=255 value=/td /tr tr td width=25%messages:/td td width=75%input name=messages type=text size=40 maxlength=255 value=/td /tr tr td width=25%nbsp;/td td width=75% align=leftinput type=submit name=submit value=Enternbspinput type=reset name=reset/td /tr /table /form /body /html # # -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ This message has been checked for all known viruses by the MessageLabs Virus Control Centre. This message has been checked for all known viruses by the MessageLabs Virus Control Centre. * Notice: This email is confidential and may contain copyright material of Ocado Limited (the Company). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company. If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses. Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY * -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] something is wrong with this query
Hi there - it's quite simple. In this query - you're asking for the average of the vote over the entire article_comment table - you haven't placed a join between the two tables. You need to find your linking field - and join them on that. Cheers, Michael. -Original Message- From: JJ Harrison [mailto:[EMAIL PROTECTED]] Sent: 18 August 2002 02:45 To: [EMAIL PROTECTED] Subject: [PHP-DB] something is wrong with this query Here the query is: select avg(article_comment.vote) as avg, article_data.aid, article_data.time, article_data.name, article_data.description from article_data, article_comment where released 1 GROUP BY article_data.aid order by time It works fine but the average echoed is always the same (which it shouldnt be). -- JJ Harrison [EMAIL PROTECTED] www.tececo.com -- Please reply on the list/newsgroup unless the reply it OT. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ This message has been checked for all known viruses by the MessageLabs Virus Control Centre. This message has been checked for all known viruses by the MessageLabs Virus Control Centre. * Notice: This email is confidential and may contain copyright material of Ocado Limited (the Company). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company. If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses. Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY * -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php