Re: [PHP-DB] Current web page being displayed

2005-08-07 Thread Matthew Weier O'Phinney
e than SCRIPT_NAME as not all httpd servers use it. > On Sat, 6 Aug 2005, Ron Piggott wrote: > > > What is the correct $_SERVER that tells me what page is currently being > > displayed? Ron -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthe

[PHP-DB] Re: Php with MySQL replication

2005-08-06 Thread Matthew Weier O'Phinney
rver, or if the slave server had stopped or did not have permissions to read from the master server. Are you absolutely certain that PHP is connecting to the master db server when performing the write operation? -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: a basic question

2005-07-03 Thread Matthew Weier O'Phinney
tter to try and handle the error, or to determine in development how to ensure it doesn't occur. However, if the error isn't critical, and your script can continue to function even if it occurs, suppressing the error often is a viable option. -- Matthew Weier O'Phinney Zend Certified E

[PHP-DB] Re: ini_set()

2005-06-06 Thread Matthew Weier O'Phinney
ll be using the value for session.use_cookies that is in the php.ini file. One possible way to get around this is to do your ini_set in a .htaccess file instead (assuming htaccess files are enabled, and you're using Apache): .htaccess: php_value session.use_cookies 0 Try

[PHP-DB] Re: sql injection attack, protection from

2005-05-17 Thread Matthew Weier O'Phinney
acing it in your database. Check to see if the data is of the correct type and/or falls within the correct range of values allowed for the field it will occupy. Doing this will help keep your data normalized and prevent headaches later on. By the way, if you want some best practices for es

[PHP-DB] Re: phpdocumentor

2005-05-04 Thread Matthew Weier O'Phinney
anyone found it causes conflict or is there really no problem? There's no problem. PhpDoc goes into comments; there's no interaction with code whatsoever. -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Specialist | http://www.garden.org National Gardening

Re: FW: [PHP-DB] mime-type related to extension?. .

2005-04-27 Thread Matthew Weier O'Phinney
agesize() -- though you should be using php >= 4.3.11 to do this safely (see http://security.gentoo.org/glsa/glsa-200504-15.xml for more information). One element returned by getimagesize() is the image MIME type. -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Specialist

[PHP-DB] Re: 'OR' logic in mySQL query

2005-04-17 Thread Matthew Weier O'Phinney
, date_received LIKE '$yesterdays_date' is what you're actually trying to test. That said, you'll get much better results with: SELECT * FROM table WHERE date_received LIKE '$todays_date' OR date_received LIKE '$yesterdays_date' ORDER BY pra

Re: [PHP-DB] Join on single table

2005-02-12 Thread Matthew Weier O'Phinney
7;ll only be operating on deltas from here out, and those can be done quite quickly. Anyways, it's a moot question now -- I've got the data in, and I'm pretty happy with the results I've seen. > On Friday 11 February 2005 11:56 am, Matthew Weier O'Phinney wrote: >>

Re: [PHP-DB] Join on single table

2005-02-11 Thread Matthew Weier O'Phinney
s (I've now got that fixed) and (2) speed. I still don't have (2) completely fixed, and it may be something I can't fix. > On Thursday 10 February 2005 07:56 pm, Matthew Weier O'Phinney wrote: >> I have a table which contains the following: >> id (pr

Re: [PHP-DB] Join on single table

2005-02-11 Thread Matthew Weier O'Phinney
* Martin Norland <[EMAIL PROTECTED]>: > Matthew Weier O'Phinney wrote: > > I have a table which contains the following: > > id (primary key, auto incrementing) > > app_id (integer, foreign key) > > resource_id (integer, foreign key) > > w

[PHP-DB] Join on single table

2005-02-10 Thread Matthew Weier O'Phinney
w to spot check 300 values to be certain that this is reasonable. In a previous incarnation of the script, I was looping through each word of each resource_id and then selecting out of tmp1 based on the single word value. The results were very different (very few matches), and, again, the sc