Re: [PHP] Simplifying MySql queries

2011-02-14 Thread Simcha Younger
(http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Simcha Younger sim...@syounger.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem with Include

2010-12-19 Thread Simcha Younger
Since it is being included by PHP, and not served by Apache, the extension is not important. -- Simcha Younger sim...@syounger.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] MySQL Query Help

2010-11-20 Thread Simcha Younger
the table structure or create table statements. If I understood correctly, you have products which reference a criteria ID which has no matching value. If this is the problem you have a to first take care of the integrity of your data, as this should never happen. -- Simcha Younger sim

Re: [PHP] Character encoding hell

2010-10-26 Thread Simcha Younger
machine). I don't want to type the display name of these files twice and the website has no database capability If you are not constantly adding/changing the files there, you can use a csv file in place of a database. -- Simcha Younger sim...@syounger.com -- PHP General Mailing List (http

Re: [PHP] Auto-generating HTML

2010-09-21 Thread Simcha Younger
HTML.) If there is a specific place you want to look at in the html, just change the lines there to look like this: echo 'html '; but this will make your PHP quite messy if you do it alot. I would go with templating, as many here suggested. -- Simcha Younger simcha.youn...@gmail.com -- PHP

Re: [PHP] MySQL select matching

2010-07-21 Thread Simcha Younger
the same. select distinct id from `table` where concat(`b`, `c`, `d`) in (select concat(`b`,`c`,`d` from `table` where id = '0001') AND id != '0001'; (untested) -- Simcha Younger sim...@syounger.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] functions and global variables

2010-07-19 Thread Simcha Younger
variables outside were not accessible. Thanks. Dave. It sounds like 'register globals' is turned on in your php.ini, and therefore $name will be visible everywhere, since it is taken from $_POST['name']. -- Simcha Younger sim...@syounger.com -- PHP General Mailing List (http://www.php.net

Re: [PHP] What am I missing here?

2010-06-21 Thread Simcha Younger
parameters. -- Simcha Younger sim...@syounger.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Preg Match Problem

2010-06-03 Thread Simcha Younger
' will match, but thats probably not what you want -- Simcha Younger sim...@syounger.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] can't retrieve more than 1 record at the time

2009-12-09 Thread Simcha Younger
. -- Simcha Younger sim...@syounger.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Math problems (No not high school math!)

2008-09-25 Thread Simcha
along at home) Something like this should work: Select SUM(timediff(`timeout`, `timein`)) where date = X; And for a week: Select SUM(timediff(`timeout`, `timein`)) where week(date) = week_of_year ; (Not tested) Simcha Younger -- PHP General Mailing List (http://www.php.net/) To unsubscribe

RE: [PHP] PHP tags - any reasons to close ?

2008-09-23 Thread Simcha Younger
, and very few editors allow you to scroll the last lines of the program above the bottom of the screen. (Crimson Editor is the only one I have found that does this.) Thanks for ideas, Martin Simcha Younger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

RE: [PHP] Function parameters and arrays

2008-09-18 Thread Simcha
This would be a little neater: foreach(func_get_arg(2) as $k = $WhereArray) { //echo $WhereArray[0][0]; $SQLStmt .= ' ' . $WhereArray[0] . ' ' . $WhereArray[1] . ' ' . $WhereArray[2]; if($k != 0) $SQLStmt .=' ' . $WhereArray[3]; }; Simcha Younger -Original Message

RE: [PHP] Confused

2008-09-02 Thread Simcha
This does not seem to be an installation problem - Your test [(!$connect_id = ] fails, since the connect returns false, so it does not run the condition. Compare: ?php if($a = false){echo no good;}else{echo condition true;} ? -Original Message- From: Dan Shirah [mailto:[EMAIL

RE: [PHP] Confused

2008-09-02 Thread Simcha
Ignore my previous email - It was sloppy. I was not focusing on the email. SY -Original Message- From: Simcha [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 02, 2008 8:41 PM To: 'Dan Shirah'; 'PHP List' Subject: RE: [PHP] Confused This does not seem to be an installation problem

RE: [PHP] Re: Variable name as a string

2008-08-28 Thread Simcha
, one the parameter - so it makes sense (sort of) to use two different terms. Simcha Younger -Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2008 4:40 PM To: php-general@lists.php.net Subject: RE: [PHP] Re: Variable name as a string At 11:50 AM +0100 8

RE: [PHP] Search Suggestions

2008-08-26 Thread Simcha Younger
back a list of names to expand, and then have Javascript go through the whole listing to find those names. Simcha Younger -Original Message- From: Dan Shirah [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 26, 2008 3:31 PM To: PHP-General List Subject: [PHP] Search Suggestions Hello

RE: [PHP] Large/unreliable file uploading over HTTP

2008-08-26 Thread Simcha Younger
Is this what you are looking for -- It's a java applet that has most of the features you mentioned. I have used it for very large files with no problem. http://www.javazoom.net/applets/jclientupload/jclientupload.html (Sorry, its not free software.) -Original Message- From: mike

RE: [PHP] Negative Look Ahead Regex - Code Mistake or Bug?

2008-08-18 Thread Simcha Younger
([\/\w\.\-]*\??)(?!PHPSESSID\=2u0c caffoh6jaeapkke35qpp87;?)/', 'http://www.domain.com$1?PHPSESSID=t9gksvpdcuobsnqt98qloe6lg4;', $buffer); (not tested) Simcha Younger -Original Message- From: Cameron B. Prince [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2008 12:56 AM To: php

RE: [PHP] preg_replace strange behaviour, duplicates

2008-08-18 Thread Simcha Younger
?php $string = The new Intel Core 2 Duo T8300; $name = Intel Core 2; $extra = Duo; $insert = Processor Technology; echo preg_replace(/({$name}{$extra}?)/, $1.$insert, $string); ? Simcha Younger -Original Message- From: Adz07 [mailto:[EMAIL PROTECTED] Sent

RE: [PHP] Negative Look Ahead Regex

2008-08-18 Thread Simcha Younger
= $href[1]; if(!strpos($href, PHPSESSID)) $href = preg_replace(/^([^#?]*)\??/, $1$id, $href); return $href.\; } $buffer = preg_replace_callback(/(href=\.*?)\/, addid, $buffer); Simcha Younger -Original Message- From: Cameron B. Prince [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2008 4

RE: [PHP] import XLS sheet into DB

2008-08-17 Thread Simcha
Try using: http://sourceforge.net/docman/display_doc.php?docid=22092group_id=99160 I have never used it, but it looks very straightforward. Docs are here: http://sourceforge.net/docman/display_doc.php?docid=22092group_id=99160 code should be something like this: (for mysql, based on

RE: [PHP] Removing an element from the middle of an mdlti-dimentsional array

2008-08-15 Thread Simcha Younger
array_splice($a, 1, 1); This will remove the second element, and reset the keys. Simcha Younger -Original Message- From: Don [mailto:[EMAIL PROTECTED] Sent: Friday, August 15, 2008 4:30 AM To: php-general@lists.php.net Subject: [PHP] Removing an element from the middle of an mdlti