Re: SQL failures, new navigation system and other things
Brought to you by:
iridium
From: Martin G. <gim...@gi...> - 2002-08-29 10:51:55
|
Ondrej Jombik <ne...@po...> writes: >> The data in those databases comes from stations.csv and should be >> safe. > > I was not doing anything on data retrieved from database. They > are always safe, IMHO. Yes, my mistake. >> If the data comes from the METARs database, then we have to >> stripslashes() because slashes might have been added when the data >> was inserted. Ups - when we add slashes to a string and insert it in the database, then we wont see the slashes again when we extract it from the database again... So the above makes no sence. > So conclusion: addslasles on strings inserted into DB is > *always* good idea. Problem may occur only if string is addslashed > twice or more times. Yes, exactly. I think the easiest way to handle this is to let the methods in the db backends be the only methods to add slashes. All other methods should not have to care about this. > I checkouted fresh copy of phpWeather, because there was lot > of merging problems. I didn't apply your patches directly (unmodified) so that's why you got merging problems. > I tried it for MySQL and PostgreSQL and it worked well. I also tried > this "new" version of phpWeather on my site and again without > problems (I only change get_country() for get_country_code() call). Good - that should be the only change necessary. Does this mean that we're ready to release the code? -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather => Shows the current weather on your webpage and PHP Shell => A telnet-connection (almost :-) in a PHP page. |