[PHP-DB] RE: stripslashes ( encodings to from MySQL )

2011-01-31 Thread Andrew Holt
Hi Donovan,

One of the things that I found really helpful was to use PDO for the database 
connections.  Whilst it's a little different than using the mysql_query () 
functions, the way that it escapes strings in and out of the database 
automatically turned into a real godsend.  There's a little tutorial and guide 
at http://www.phpro.org/tutorials/Introduction-to-PHP-PDO.html which shows you 
how it all works and was quite helpful for me.

Andrew

-Original Message-
From: Donovan Brooke [mailto:li...@euca.us] 
Sent: 28 January 2011 18:40
To: php-db@lists.php.net
Subject: stripslashes ( encodings to from MySQL )

Hello,

I use mysql_real_escape_string() to
escape data for db population.

ie.

..form..
textarea?PHP stripslashes($dbvar); ?/textarea

..recieving form input before db update..
$var =mysql_real_escape_string($var);

My question is regarding when wanting to allow HTML
within a database...

Will stripslashes also take out the slashes from something
like this?:
span style=color:red;some text/span


That would effectively negated the ability to use HTML/CSS
in your db. If so, how do you get around this with safe data
entry?

TIA,
Donovan




-- 
D Brooke

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Leap Year

2011-01-31 Thread Ron Piggott

Does mySQL have the ability to figure out if it is leap year?  If so, what is 
the correct syntax for:

AND `day`  366 unless it is leap year
Ron

The Verse of the Day
“Encouragement from God’s Word”
http://www.TheVerseOfTheDay.info  


Re: [PHP-DB] Leap Year

2011-01-31 Thread Bastien Koert
On Mon, Jan 31, 2011 at 8:06 AM, Ron Piggott
ron.pigg...@actsministries.org wrote:

 Does mySQL have the ability to figure out if it is leap year?  If so, what is 
 the correct syntax for:

 AND `day`  366 unless it is leap year
 Ron

 The Verse of the Day
 “Encouragement from God’s Word”
 http://www.TheVerseOfTheDay.info


http://www.phpclasses.org/package/3539-PHP-Check-whether-a-given-year-is-a-leap-year.html

http://www.freeopenbook.com/mysqlcookbook/mysqlckbk-CHP-5-SECT-28.html

http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html

-- 

Bastien

Cat, the other other white meat

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] PostgreSQL Conference East: 2011 CFP

2011-01-31 Thread Joshua D. Drake
Following on the smashing success of PostgreSQL Conference West,
PostgreSQL Conference West, The PostgreSQL Conference for Developers,
End Users and Decision Makers, is being held at the Hotel Pennsylvania,
in New York City from March 22nd through 25th 2011. Please
join us in continuing to make this the largest PostgreSQL Conference 
series! 

Main site:
http://www.postgresqlconference.org/

CFP:
https://www.postgresqlconference.org/talk_types

Time line:
Dec 16th: Talk submission opens
Feb 10th: Talk submission closes
Feb 15th: Speaker notification

This year we will be continuing our trend of covering the entire
PostgreSQL ecosystem. We would like to see talks and tutorials on the
following topics:

  * General PostgreSQL: 
  * Administration 
  * Performance 
  * High Availability 
  * Migration 
  * GIS 
  * Integration 
  * Solutions and White Papers 
  * The Stack: 
  * Python/Django/Pylons/TurboGears/Custom 
  * Perl5/Catalyst/Bricolage 
  * Ruby/Rails 
  * Java (PLJava would be great)/Groovy/Grails 
  * Operating System optimization
(Linux/FBSD/Solaris/Windows) 
  * Solutions and White Papers 

-- 
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering
http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php