RE: [PHP-DB] Re: SQL or array ?

2005-04-24 Thread Juffermans, Jos
Hi, I'd just like to point out that one important option was overlooked: You could create a SQL query which would read the folders AND the mimetype/icon info at the same time. This means that you can have your database do most of the work for you which normally means it's faster. Rgds, Jos -

Re: [PHP-DB] PHP and Mysql help

2005-04-24 Thread Amos Glenn
ReClMaples wrote: $zipcode = mysql_query( "SELECT * FROM zip_code where ZG_LATITUDE >= $Lat1 and ZG_LATITUDE <= $Lat2 and ZG_LONGITUDE >= $Lon1 and ZG_LONGITUDE <= $Lon2"); Try putting single quotes around the variables in your query string; mysql sees them as strings, not variables: ... ZG_LATIT

Re: [PHP-DB] PHP and Mysql help

2005-04-24 Thread Colin Busby
Hey, That is a lot of code, so I only skimmed it, but right off the bat i noticed that you are missing a space in between WHERE and zg_zipcode, as shown below: $res = mysql_query("SELECT ZG_LATITUDE, ZG_LONGITUDE FROM zip_code wherezg_zipcode = '$zip'"); should be: $res = mysql_query("SELECT Z

[PHP-DB] PHP and Mysql help

2005-04-24 Thread ReClMaples
Can someone help me out with an issue I'm having? Here is my code: $res = mysql_query("SELECT ZG_LATITUDE, ZG_LONGITUDE FROM zip_code wherezg_zipcode = '$zip'"); List($Lat,$Lon) = mysql_fetch_row($res); $Lat1 = ($Lat-2); $Lat2= ($Lat+2); $Lon1= ($Lon-2); $Lon2= ($Lon+2); //echo ($Lat1);

[PHP-DB] Unable to change default collation

2005-04-24 Thread JohnyG
Hi, I have some php application with encoding problem. I need to change the mySql default encoding to - Hebrew iso 8859-8. I installed phpmyadmin, you can see it and change things here (it is not protected): http://www.adeo.co.il/temp/php/ For some reason i can not find Hebrew iso in the available

Re: [PHP-DB] Re: SQL or array ?

2005-04-24 Thread Simon Rees
On Sunday 24 April 2005 12:25, Paul Reilly wrote: > How would I go about benchmarking the different options? > What tools are there to do this? a) time the script - quick, dirty and inaccurate but may provide an indicative result. b) use a profiler, which can be more interesting as it will show

Re: [PHP-DB] postgresql and php

2005-04-24 Thread Robby Russell
On Sat, 2005-04-23 at 20:31 -0500, Tate wrote: > I have php and postgresql installed on my laptop with linux fedora core > 3. Everything is working fine, but I have created a survey and want the > entries automatically inserted into the database. > > I know what my SQL should be, but I'm not su

[PHP-DB] Re: SQL or array ?

2005-04-24 Thread Paul Reilly
Okay, thanks all. I think what I'll do is save the data in a DB, and then read it in to an array when the script is first called. That way it doesn't need to perform the SQL query per mime_type hundreds of times, and can just key it from the array. How would I go about benchmarking the different