php-general Digest 2 Jul 2007 00:06:55 -0000 Issue 4879
php-general Digest 2 Jul 2007 00:06:55 - Issue 4879 Topics (messages 258021 through 258024): Re: Flash / Ajax / PHP 258021 by: David Giragosian Re: mail function problem 258022 by: Chris Re: Selecting Rows Based on Row Values Being in Array 258023 by: kvigor Anybody had luck compiling memcache with php6 ? 258024 by: Cathy Murphy Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- On 7/1/07, Ryan A [EMAIL PROTECTED] wrote: but the image, when updated, is still unstable on IE while still _perfectly_ stable on FireFox. This might be due to cacheing on IE which anyone who has messed with php online for a little time will be familier with. IE is a bitch at times... just likes the company that makes the software ;) Sometimes this gets solved with spitting out some headers telling IE not to cache while others have (dirty) solved it by adding a hash or something else unique to the page or the image... for example: php_script.php?get_img=img_namerandom=something_random_here HTH. Cheers! R -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) -- Get the Yahoo! toolbar and be alerted to new email http://us.rd.yahoo.com/evt=48225/*http://new.toolbar.yahoo.com/toolbar/features/mail/index.phpwherever you're surfing. Thanks, Ryan. That gives me something to explore when I get to work on Monday. David ---End Message--- ---BeginMessage--- [EMAIL PROTECTED] wrote: Hi, I'm running PHP 5.2.3 on Solaris 10 (AMD64). My mail function doesn't send any mail, the return value of mail function is false... But sendmail_path value is OK in php.ini, and I've tried to send a mail with sendmail on console with the same user (the apache user), and everything's ok... Does anyone have solution ? Check your mail logs and your apache logs to see if any errors are showing up. -- Postgresql php tutorials http://www.designmagick.com/ ---End Message--- ---BeginMessage--- Jim, Please excuse the ignorance, I'm a newbie, but I'm only use to simple SELECT, INSERT statements. Your original code: $SQL = SELECT * FROM my_Table WHERE CONCAT(value1, value2, value3) IN ('.join(',', $list).') OK, I get everything up to the ('''.join(''','''$list).''') I'm guessing that the .join( ). putting together some values, but I don't know what also the .join( ). is to be preceded by something... I don't know what. //Forgive my ignorance, I'll can get it. Also the .join( ). what is this doing I looked at the PHP and MySQL function of each, and haven't seen comparable code. I'm asking because I don't know where we're telling the code to compare the values. You stated... and create one string from them Where do I give the name to the string? So this is where I am so far: $sql = SELECT* FROM table WHERE CONCAT(size,color,weight) IN( ); Jim Lucas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] K. Hayes wrote: Will do. Thanks. - Original Message - From: Jim Lucas [EMAIL PROTECTED] To: kvigor [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, June 30, 2007 1:46 AM Subject: Re: [PHP] Selecting Rows Based on Row Values Being in Array kvigor wrote: Hello All, I'm attempting to return rows from a mysql DB based on this criteria: I have a list, in the form of an array that I need to compare against each row in the table. Where theres a match I need that entire row returned. e.g.$varListof 3outOf_10Fields = array(6blue40lbs, 7orange50lbs, 8orange60lbs, 9purple70lbs); The array contains 3 of the db row fields in 1 value. However there are 10 fields/columns in the table. === what table looks like | === size colorweight ROW 1| value1 | value1 | value1 | value1 | value1 | value1 | So how could I set up a query that would SELECT the entire row, if the row contained $varListof 3outOf_10Fields[1]. Open to any suggestions or work arounds. I'm playing with extract() but code is too crude to even post. I would suggest approaching the problem with a slightly different thought. just have the sql concat() the columns together and then compare. something like this should do the trick $list = array( '6blue40lbs', '7orange50lbs', '8orange60lbs', '9purple70lbs', ); $SQL = SELECT * FROM my_Table WHERE CONCAT(value1, value2, value3) IN ('.join(',', $list).') ; mysql_query($SQL); this should take, for each row in the DB, value1 + value2 + value3 and create one string from them, then it will compare each string in the IN (...) portion to each entry in the $list array(). Let me
Re: [PHP] Flash / Ajax / PHP
but the image, when updated, is still unstable on IE while still _perfectly_ stable on FireFox. This might be due to cacheing on IE which anyone who has messed with php online for a little time will be familier with. IE is a bitch at times... just likes the company that makes the software ;) Sometimes this gets solved with spitting out some headers telling IE not to cache while others have (dirty) solved it by adding a hash or something else unique to the page or the image... for example: php_script.php?get_img=img_namerandom=something_random_here HTH. Cheers! R -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) - Get the Yahoo! toolbar and be alerted to new email wherever you're surfing.
Re: [PHP] Flash / Ajax / PHP
On 7/1/07, Ryan A [EMAIL PROTECTED] wrote: but the image, when updated, is still unstable on IE while still _perfectly_ stable on FireFox. This might be due to cacheing on IE which anyone who has messed with php online for a little time will be familier with. IE is a bitch at times... just likes the company that makes the software ;) Sometimes this gets solved with spitting out some headers telling IE not to cache while others have (dirty) solved it by adding a hash or something else unique to the page or the image... for example: php_script.php?get_img=img_namerandom=something_random_here HTH. Cheers! R -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) -- Get the Yahoo! toolbar and be alerted to new email http://us.rd.yahoo.com/evt=48225/*http://new.toolbar.yahoo.com/toolbar/features/mail/index.phpwherever you're surfing. Thanks, Ryan. That gives me something to explore when I get to work on Monday. David
Re: [PHP] mail function problem
[EMAIL PROTECTED] wrote: Hi, I'm running PHP 5.2.3 on Solaris 10 (AMD64). My mail function doesn't send any mail, the return value of mail function is false... But sendmail_path value is OK in php.ini, and I've tried to send a mail with sendmail on console with the same user (the apache user), and everything's ok... Does anyone have solution ? Check your mail logs and your apache logs to see if any errors are showing up. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Selecting Rows Based on Row Values Being in Array
Jim, Please excuse the ignorance, I'm a newbie, but I'm only use to simple SELECT, INSERT statements. Your original code: $SQL = SELECT * FROM my_Table WHERE CONCAT(value1, value2, value3) IN ('.join(',', $list).') OK, I get everything up to the ('''.join(''','''$list).''') I'm guessing that the .join( ). putting together some values, but I don't know what also the .join( ). is to be preceded by something... I don't know what. //Forgive my ignorance, I'll can get it. Also the .join( ). what is this doing I looked at the PHP and MySQL function of each, and haven't seen comparable code. I'm asking because I don't know where we're telling the code to compare the values. You stated... and create one string from them Where do I give the name to the string? So this is where I am so far: $sql = SELECT* FROM table WHERE CONCAT(size,color,weight) IN( ); Jim Lucas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] K. Hayes wrote: Will do. Thanks. - Original Message - From: Jim Lucas [EMAIL PROTECTED] To: kvigor [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Saturday, June 30, 2007 1:46 AM Subject: Re: [PHP] Selecting Rows Based on Row Values Being in Array kvigor wrote: Hello All, I'm attempting to return rows from a mysql DB based on this criteria: I have a list, in the form of an array that I need to compare against each row in the table. Where theres a match I need that entire row returned. e.g.$varListof 3outOf_10Fields = array(6blue40lbs, 7orange50lbs, 8orange60lbs, 9purple70lbs); The array contains 3 of the db row fields in 1 value. However there are 10 fields/columns in the table. === what table looks like | === size colorweight ROW 1| value1 | value1 | value1 | value1 | value1 | value1 | So how could I set up a query that would SELECT the entire row, if the row contained $varListof 3outOf_10Fields[1]. Open to any suggestions or work arounds. I'm playing with extract() but code is too crude to even post. I would suggest approaching the problem with a slightly different thought. just have the sql concat() the columns together and then compare. something like this should do the trick $list = array( '6blue40lbs', '7orange50lbs', '8orange60lbs', '9purple70lbs', ); $SQL = SELECT * FROM my_Table WHERE CONCAT(value1, value2, value3) IN ('.join(',', $list).') ; mysql_query($SQL); this should take, for each row in the DB, value1 + value2 + value3 and create one string from them, then it will compare each string in the IN (...) portion to each entry in the $list array(). Let me know if you need any further help one other thing, make sure that you run each of the values in the $list array() through mysql_real_escape_string(). That way it is all nicely encoded for the SQL statement. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Anybody had luck compiling memcache with php6 ?
I am trying to compile memcache 2.1.2 with php6 , but getting errors . Anybody had luck with this? Thanks, Cathy www.nachofoto.com