Re: SQL failures, new navigation system and other things
Brought to you by:
iridium
From: Ondrej J. <ne...@po...> - 2002-08-27 19:20:38
|
Maxim, 20:37:32 27. august 2002 (utorok) Greetings! > All shoud work well for MySQL. There is a need for implementation of > the same thing in other DB modules as it is in MySQL one. Once again, they > are these three: As I said, I implemented that stuff for PostgreSQL. I supposed that it will take few hours to study PostgreSQL SQL language specials, but in fact it took only few minutes. Patch in attachement. > 1. Proper query escaping. Quesries seems to be properly escaped. But at least insert will fail if $cc or $location will contain apostroph character. But, well isit possible? > 2. Slashes stripping when returning icao instead name of station. Done. > 3. Method get_country($icao), which returns country code for > partcular icao. Done. Copy/paste from MySQL module did the work (but I was forced to use ' instead of ", strange isn't it? :-) > I will implement it today night for PostgreSQL, but what about DBA? Maybe I will also learn DBA till tomorrow I will send patch also for this, but now I really don't know how does it works because my glance at sources tell that it is not like classical RDBM SQL systems. Another issue for PostgreSQL is that when using function "Create or Recreate Tables" it will fail if I give it empty database. It is due fact, that in PostgreSQL it is impossible to DROP TABLE that does not exists. I solve this problem with these two commands: phpweather=> create table metars ( foo int ); CREATE phpweather=> create table stations ( foo int ); CREATE phpweather=> But it needs more complex solution anyway. =Nepto= ____________________________________________________________________________ Ondrej 'Nepto' Jombik, Open Source software developer, http://www.platon.sk/ |