Re: [PHP-DB] sobig virus
I have had 40+ virused emails to the address I use for this list. Possible they came from another source but this is the most likely. Curious - I've not seen any, so it must be someone harvesting rather than using the list? Lets see if my posting brings some actions ;) Please check your virus scanners are up to date - 2 day old Norton virus definitions did not pick it up. Personally. I remove IE from the machines and just run Mozilla. None of my customers have had a problem for some time now - only the one who insisted that IE was essential - he has Mozilla running now :) -- Lester Caine - L.S.Caine Electronic Services -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Queries probably timing out
I upgraded my server to RedHat 9 and the problem was solved. Thanks Emery - Original Message - From: Micah Stevens [EMAIL PROTECTED] To: PHP-DB List [EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 22:32 Subject: Re: [PHP-DB] Queries probably timing out IF it's a linux server apparently there's a glibc problem from a while back that causes this. Check to see if it's a redhat server. If that's the case, all you can do is get your host to upgrade. Or host your own server. It's starting to sound like a OS issue after searching around on google. I'l call up tech support and whine until they did something, but that's just me. :) That query isn't that bad. -Micah On Tuesday 19 August 2003 10:54 am, Dillon, John wrote: I set set_time_limit (10*60); high up. Error message: Lost connection to MySQL server during query Query is: $query=CREATE TABLE IF NOT EXISTS $tbl1 SELECT TestData1.Year, TestData1.Period,TestData1.Co,TestData1.Acct,TestData1.Dept,TestData1.Descr i ption,TestData1.Net,TestData1.Net*.175 AS Exps175, TestData2.USD FROM TestData1 INNER JOIN TestData2 ON CONCAT(TestData1.Journal,TestData1.Description)=CONCAT(TestData2.journal,Te s tData2.description) WHERE TestData1.Dept'D1'; Thanks, John -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: 19 August 2003 18:00 To: PHP-DB List Subject: Re: [PHP-DB] Queries probably timing out What leads you to believe that it's a query timeout? Is the php script timing out waiting for the database? Do you get an error saying something about Max Execution Time? If so, you may want to set that higher in your script. Go check out: http://si.php.net/manual/en/function.set-time-limit.php That's not a small database, but it unless you're query has some CRAZY join action in it, it should pre fairly speedy. I've never seen MySQL time out though. Even with some stupidly slow queries I've done in the past. So I'm guessing it's PHP. If you get an error, post it on the list. -Micah On Tuesday 19 August 2003 2:59 am, Ignatius Reilly wrote: - Original Message - From: Dillon, John [EMAIL PROTECTED] To: PHP-DB List [EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 11:47 AM Subject: [PHP-DB] Queries probably timing out I'm doing queries on tables with 45,000 rows in one table and 1-2000 rows in another.. I think the queries are failing due to timeout on the server. The server is not dedicated to me and I may not be able to affect the timeout settings...though I'll ask my hosting company (Positive Internet). If I decide to do the queries on my local PC (I don't need or want to do them over the internet), (1) do I have to set up my PC as a server, Yes. (2) if so what's the quickest and easiest server to get started with, Install Apache, PHP and MySQL. There are countless tutes on the web on how to do so. It is a breeze under Windows 2000 (3) are there complications running the server on the same PC as the client applications (ie my PHP code), No, except maybe performance (4) do I then download MySQL and PHP onto it, though I read PHP comes bundled with MySQL, PHP has an API to MySQL, but you have to have first a MySQL server running (5) will it become clear to me what host name/IP address to use to connect to the database (up to now I've been told by the hosting company). You can use a dynamic DNS set-up (look for instance www.dnsmadeeasy.com) if you need a name-based address. Also a breeze to set up. Any other suggestions on timeouts on queries? Thanks, John http://www.cantor.com CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Copyright and any other intellectual property rights in its contents are the sole property of Cantor Fitzgerald. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to
Re: [PHP-DB] Calculating daylight savings time
I saw it, at first I didn't think it would work but it's great - just what I need. I guess I was just surprised that there isn't an easier way to do this in PHP by switching from the default. I also like to write my own code rather than use someone else's, since it's the best way to learn, but in this case it wasn't worth rewriting this function from scratch since it does exactly what I need. I'm still confused though about setlocale - what does this do in plain English? Thanks for the info, -Lisi At 10:05 AM 8/19/03 -0700, Micah Stevens wrote: Here's the example code I was talking about in the docs, you should really read the user submitted notes in the docs, they're very helpful, moreso than the docs from time to time. (this is not my code..) leafrink at hotmail dot com 28-Feb-2003 07:26 Wrote this function after a fair bit of searching on the subject. Don't know if it's the best way to do it, but it works. Its not that exact but it's pretty close. Hope it helps someone out there. /** * function for working out if it is daylight savings for a specific date. * must specify when daylight savings starts and ends in the format * [1=First,2=Second,3=Third,4=Fourth,L=Last]:NameOfDay:Of The Month * e.g. L:Sun:3 = Last Sunday in March * some will not meet this criteria but most do. * * see - http://webexhibits.org/daylightsaving/g.html for daylight savings times around the world. * */ function is_daylight_savings($gmtime,$DSTStart = '',$DSTEnd = ''){ //global $locale; //For Most Of Australia //DayLightSavings Starts Last sunday in October $DSTStart = L:Sun:10;//$locale['DSTStart']; //DayLightSavings Ends Last Sunday in March $DSTEnd = L:Sun:3;//$locale['DSTEnd']; $DSTStart = split(:,$DSTStart); $DSTEnd = split(:,$DSTEnd); $gmtMonth = date(n,$gmtime); // if not even in the Important changeover months. if ($gmtMonth $DSTStart[2] $gmtMonth $DSTEnd[2]){ return false; } else if ($gmtMonth $DSTStart[2] || $gmtMonth $DSTEnd[2]) { return true; } else { //it is in the Start or End Month if ($gmtMonth == $DSTStart[2]){ $True = true; $week = $DSTStart[0]; $ImportantDay = $DSTStart[1]; } else {//it is in the End Month $True = false; $week = $DSTEnd[0]; $ImportantDay = $DSTEnd[1]; } //get the day of the month $gmtDay = date(j,$gmtime); //work out what week it starts/ends. if ($week == 'L'){ $week = 4; $ldom = 4;//last day of month factor } //if the week in which it starts/ends has not been reached if($gmtDay ($week-1)*7){ return (!$True); } else { $gmtDate = getdate($gmtime); //go by a Day of the Week Basis for ($i=($week-1)*7;$i(($week*7)+$ldom);$i++){ $checkDate = mktime(0,0,0,$gmtDate[mon],$i,$gmtDate[year]); //get the actual day it starts/ends if (date(D,$checkDate) == Sun date(n,$checkDate) == $gmtMonth ){ $day = date(j,$checkDate); } } if ($gmtDay $day) {//if it has not reached the day return (!$True); } else { return $True; } } } } //Testing if(is_daylight_savings(strtotime(26-Oct-2003))){ echo is DAYLIGHT SAVINGS; }else { echo is NOT DAYLIGHT SAVINGS; } On Tuesday 19 August 2003 2:37 am, Lisi wrote: What I need to do is figure this out for more than one location at a time. I am displaying Sabbath times for several different cities around the world at once (New York, London, Paris, Jerusalem, Sydney) - i.e. a certain amount of time before sunset, different for each city and each city is in a different dst zone. Can I do something using setlocale, to change timezones to the city I need, and then use date(I)? Or does date(I) always work only for the US? And what exactly does setlocale change? I couldn't figure out from the notes on php.net. Thanks for your help, -Lisi At 12:06 AM 8/17/03 -0700, Micah Stevens wrote: As an afterthought, the docs are inspecific on who's daylight savings schedule that the function returns. There's another user submitted function in the comments list that takes into account a specific schedule. -Micah On Sunday 17 August 2003 12:43 am, Lisi wrote: I have sunset times stored in a database and the a PHP page that performs a number of calculations on the retrieved time. One of the things I need to figure out is whether or not to add an hour for Daylight Savings Time. Since there is more than once location, and each one begins and ends DST at a different time, I need to figure this out based on location. My question is, how do I figure out whether it's the first sunday in April yet or not? I know it has to do with the date() function somehow, I'm just not sure how to use it properly in this case - any suggestions? Thanks, -Lisi -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List
[PHP-DB] Saving MySQL data as an Excel Spreadsheet...?
I've just done a search on goolge for this, and found several products that do it, but I'm convinced there's gotta be an open source option? Anyone able to point me in the right direction with this? * The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. ***
RE: [PHP-DB] Saving MySQL data as an Excel Spreadsheet...?
have you tried saving the data as a set of comma separated values (CSV file)? Microsoft Excel can open/import these files. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 4:58 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Saving MySQL data as an Excel Spreadsheet...? I've just done a search on goolge for this, and found several products that do it, but I'm convinced there's gotta be an open source option? Anyone able to point me in the right direction with this? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Saving MySQL data as an Excel Spreadsheet...?
you can also send the appropraite headers to output directly to excel from the browser, i.e something like this:- ? if($_GET['FORMAT'] == 'XLS'){ header(Content-Type: application/vnd.ms-excel); header(Content-Disposition: inline; filename=\file.xls\); } ? this needs to be at the very start of the page and before any output to the browser, also in this case you'll need to send FORMAT=XLS in the GET array but you can of course take that bit out if you want the data to be in excel format always. if you already have tables outputing to html then this will convert it excel and open an excel window and display the tables. Any formating you do to the html will be shown in the excel file as well. seems to easy to be true but it is! change 'inline' to 'attachment' to simply download the file, or give the user the choice of what to do. -Original Message- From: Ramil Sagum [mailto:[EMAIL PROTECTED] Sent: 20 August 2003 10:23 To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Saving MySQL data as an Excel Spreadsheet...? have you tried saving the data as a set of comma separated values (CSV file)? Microsoft Excel can open/import these files. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 4:58 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Saving MySQL data as an Excel Spreadsheet...? I've just done a search on goolge for this, and found several products that do it, but I'm convinced there's gotta be an open source option? Anyone able to point me in the right direction with this? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Saving MySQL data as an Excel Spreadsheet...?
if you're looking for a little more control over your documents, i'd try this class. Its based on the WriteExcel Perl Module. Perl class docs can be found here---http://search.cpan.org/author/JMCNAMARA/Spreadsheet-WriteExcel-0.41/WriteExcel.pm. I've found _very_ few things for my needs that the PHP version does not support. http://phpclasses.iplexx.at/browse.html/package/767.html hth Jeff Griffiths, Daniel [EMAIL PROTECTED]To: Ramil Sagum [EMAIL PROTECTED], [EMAIL PROTECTED] onconf.orgcc: Subject: RE: [PHP-DB] Saving MySQL data as an Excel Spreadsheet...? 08/20/2003 05:34 AM you can also send the appropraite headers to output directly to excel from the browser, i.e something like this:- ? if($_GET['FORMAT'] == 'XLS'){ header(Content-Type: application/vnd.ms-excel); header(Content-Disposition: inline; filename=\file.xls\); } ? this needs to be at the very start of the page and before any output to the browser, also in this case you'll need to send FORMAT=XLS in the GET array but you can of course take that bit out if you want the data to be in excel format always. if you already have tables outputing to html then this will convert it excel and open an excel window and display the tables. Any formating you do to the html will be shown in the excel file as well. seems to easy to be true but it is! change 'inline' to 'attachment' to simply download the file, or give the user the choice of what to do. -Original Message- From: Ramil Sagum [mailto:[EMAIL PROTECTED] Sent: 20 August 2003 10:23 To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Saving MySQL data as an Excel Spreadsheet...? have you tried saving the data as a set of comma separated values (CSV file)? Microsoft Excel can open/import these files. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 4:58 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Saving MySQL data as an Excel Spreadsheet...? I've just done a search on goolge for this, and found several products that do it, but I'm convinced there's gotta be an open source option? Anyone able to point me in the right direction with this? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Returning Results
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... OK, I'll apologize in advance if this is a little off topic, but I think it'll be close enough. I have a form (searchform.php) that collects data for a search (e.g., firstname, lastname). That form submits to a separate PHP script (search.php) that queries a database to find matching rows and returns the information in an array ($results). All pretty standard stuff and it all works. I know I while() the information in the resulting array ($results) to draw a table showing all of the results. But what that would require is the form (searchform.php) to collect the data and submit to the search.php script where HTML and PHP code combine in one file to perform the query and draw the results. I know how to do this and have done it in the past. However, this instance has a wrinkle to it. When the searchform.php form submits to search.php, I want to perform the query, but return the user (and the $results array) to searchform.php to display the results. I want to stress that I can get the information from the database with no problem. I'm just stuck on how to get the results back to the page that called the search.php script in the first place. Is turning search.php into a function and return-ing the results the only way to accomplish this? Because the only other idea I can come up with is using a header(Location:http://searchform.php?rs=$results;); statement and that doesn't seem to work (and logically, I can see why). I'm not asking for a total solution here because I can handle the whole solution myself. However I would appreciate a bump in the right direction in regards to how to architect the application logic. What about using the same script to provide the search form and process the results? If you use say a submit button to send the form, you can check the value of the button name and branch your script accordingly, like: switch $action: { case 'Search': // Button Search is clicked // do search and display results break; default: // No value for $action, e.g. first call of page // display the search form break; } Add other case values and season to taste :-) Cheers -- Quod subigo farinam $email =~ s/oz$/au/o; A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Host check?
http://www.beamhost.co.uk/hosting.html I'm moving hosts with our site at work... I found these guys and am very impressed. Has anyone had any dealings with them? Know if they are any good? Tris... * The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. ***
Re: [PHP-DB] Returning Results
I would advise making your search.php a function. This offers a lot of other flexibility. On your searchform.php page just have an if() function to determine if any search parameters were passed. If there are parameters, perform the search. If there are results, display them, otherwise display the search form with a message that there were no results found. Basically you are merging everything into one file and having a couple of conditional display areas. And if you use GET instead of POST in your form, the user can bookmark the resulting page. On Tuesday, August 19, 2003, at 01:54 PM, Hutchins, Richard wrote: OK, I'll apologize in advance if this is a little off topic, but I think it'll be close enough. I have a form (searchform.php) that collects data for a search (e.g., firstname, lastname). That form submits to a separate PHP script (search.php) that queries a database to find matching rows and returns the information in an array ($results). All pretty standard stuff and it all works. I know I while() the information in the resulting array ($results) to draw a table showing all of the results. But what that would require is the form (searchform.php) to collect the data and submit to the search.php script where HTML and PHP code combine in one file to perform the query and draw the results. I know how to do this and have done it in the past. However, this instance has a wrinkle to it. When the searchform.php form submits to search.php, I want to perform the query, but return the user (and the $results array) to searchform.php to display the results. I want to stress that I can get the information from the database with no problem. I'm just stuck on how to get the results back to the page that called the search.php script in the first place. Is turning search.php into a function and return-ing the results the only way to accomplish this? Because the only other idea I can come up with is using a header(Location:http://searchform.php?rs=$results;); statement and that doesn't seem to work (and logically, I can see why). I'm not asking for a total solution here because I can handle the whole solution myself. However I would appreciate a bump in the right direction in regards to how to architect the application logic. Thanks in advance, Rich Rich Hutchins -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Brent Baisley Systems Architect Landover Associates, Inc. Search Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Query runs fine on Console but not in PHP
First FreeTDS should have built support for TDS protocol version 8.0. The tds protocol version should also be set to 8.0 in interface file. Details about this is included with the FreeTDS source distribution. -- bob On Mon, 18 Aug 2003, vish.kohli wrote: Thanks for your response. My script is running on Linux. I am trying to retrieve simple data such as text and numbers. I am not sure what the TDS protocol setting should be. What are the typical settings and how can I check it? Would appreciate any tips for debugging. Thanks. - Original Message - From: Robert Twitty [EMAIL PROTECTED] To: vish.kohli [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, August 18, 2003 8:28 AM Subject: Re: [PHP-DB] Query runs fine on Console but not in PHP What platform are you using? Since it appears that the script is crashing, you are probably on Linux or some other UNIX flavor. If this is the case, the TDS protocol setting may not be correct. What type of date are you retrieving with this stored procedure? -- bob On Sun, 17 Aug 2003, vish.kohli wrote: Hi, I am trying to execute a stored procedure in PHP via mssql_query () function. I pass 8 parameters to it. The query runs fine in SQL Query Analyzer but when I run it thru PHP, it behaves strangely. I can get number of rows (mssql_num_rows()) and number of fields (mssql_num_fields()) in PHP, but when I try to execute mssql_fetch_object() or mssql_fetch_array() on the same result identifier, I get a Page could not be displayed (standard internet error page). Please help. Thanks in advance. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Queries probably timing out
I've solved the immediate problem by doing another temp query to make the big table smaller - first doing the WHERE clause and the CONCAT to cut down the work on the second temp query. Thanks for all the suggestions. However, while setting PHP/MySQL/Apache up on my computer to try solve this I've just noticed that PHP is not recommended with the latest verion of Apache. Should I/can I just uninstall Apache in order to roll it back from the 2.0 version to the previous stable 1.x version? I don't see any uninstall file in the Apache directory... John -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: 19 August 2003 20:32 To: PHP-DB List Subject: Re: [PHP-DB] Queries probably timing out IF it's a linux server apparently there's a glibc problem from a while back that causes this. Check to see if it's a redhat server. If that's the case, all you can do is get your host to upgrade. Or host your own server. It's starting to sound like a OS issue after searching around on google. I'l call up tech support and whine until they did something, but that's just me. :) That query isn't that bad. -Micah On Tuesday 19 August 2003 10:54 am, Dillon, John wrote: I set set_time_limit (10*60); high up. Error message: Lost connection to MySQL server during query Query is: $query=CREATE TABLE IF NOT EXISTS $tbl1 SELECT TestData1.Year, TestData1.Period,TestData1.Co,TestData1.Acct,TestData1.Dept,TestData1.Descr i ption,TestData1.Net,TestData1.Net*.175 AS Exps175, TestData2.USD FROM TestData1 INNER JOIN TestData2 ON CONCAT(TestData1.Journal,TestData1.Description)=CONCAT(TestData2.journal,Te s tData2.description) WHERE TestData1.Dept'D1'; Thanks, John -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: 19 August 2003 18:00 To: PHP-DB List Subject: Re: [PHP-DB] Queries probably timing out What leads you to believe that it's a query timeout? Is the php script timing out waiting for the database? Do you get an error saying something about Max Execution Time? If so, you may want to set that higher in your script. Go check out: http://si.php.net/manual/en/function.set-time-limit.php That's not a small database, but it unless you're query has some CRAZY join action in it, it should pre fairly speedy. I've never seen MySQL time out though. Even with some stupidly slow queries I've done in the past. So I'm guessing it's PHP. If you get an error, post it on the list. -Micah On Tuesday 19 August 2003 2:59 am, Ignatius Reilly wrote: - Original Message - From: Dillon, John [EMAIL PROTECTED] To: PHP-DB List [EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 11:47 AM Subject: [PHP-DB] Queries probably timing out I'm doing queries on tables with 45,000 rows in one table and 1-2000 rows in another.. I think the queries are failing due to timeout on the server. The server is not dedicated to me and I may not be able to affect the timeout settings...though I'll ask my hosting company (Positive Internet). If I decide to do the queries on my local PC (I don't need or want to do them over the internet), (1) do I have to set up my PC as a server, Yes. (2) if so what's the quickest and easiest server to get started with, Install Apache, PHP and MySQL. There are countless tutes on the web on how to do so. It is a breeze under Windows 2000 (3) are there complications running the server on the same PC as the client applications (ie my PHP code), No, except maybe performance (4) do I then download MySQL and PHP onto it, though I read PHP comes bundled with MySQL, PHP has an API to MySQL, but you have to have first a MySQL server running (5) will it become clear to me what host name/IP address to use to connect to the database (up to now I've been told by the hosting company). You can use a dynamic DNS set-up (look for instance www.dnsmadeeasy.com) if you need a name-based address. Also a breeze to set up. Any other suggestions on timeouts on queries? Thanks, John http://www.cantor.com CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Copyright and any other intellectual property rights in its contents are the sole property of Cantor Fitzgerald. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Although we routinely screen for viruses, addressees
Re: [PHP-DB] Calculating daylight savings time
It tells PHP which way to format various locale specific functions. (date stuff, money stuff, etc..) -Micah On Wednesday 20 August 2003 2:23 am, Lisi wrote: I saw it, at first I didn't think it would work but it's great - just what I need. I guess I was just surprised that there isn't an easier way to do this in PHP by switching from the default. I also like to write my own code rather than use someone else's, since it's the best way to learn, but in this case it wasn't worth rewriting this function from scratch since it does exactly what I need. I'm still confused though about setlocale - what does this do in plain English? Thanks for the info, -Lisi At 10:05 AM 8/19/03 -0700, Micah Stevens wrote: Here's the example code I was talking about in the docs, you should really read the user submitted notes in the docs, they're very helpful, moreso than the docs from time to time. (this is not my code..) leafrink at hotmail dot com 28-Feb-2003 07:26 Wrote this function after a fair bit of searching on the subject. Don't know if it's the best way to do it, but it works. Its not that exact but it's pretty close. Hope it helps someone out there. /** * function for working out if it is daylight savings for a specific date. * must specify when daylight savings starts and ends in the format * [1=First,2=Second,3=Third,4=Fourth,L=Last]:NameOfDay:Of The Month * e.g. L:Sun:3 = Last Sunday in March * some will not meet this criteria but most do. * * see - http://webexhibits.org/daylightsaving/g.html for daylight savings times around the world. * */ function is_daylight_savings($gmtime,$DSTStart = '',$DSTEnd = ''){ //global $locale; //For Most Of Australia //DayLightSavings Starts Last sunday in October $DSTStart = L:Sun:10;//$locale['DSTStart']; //DayLightSavings Ends Last Sunday in March $DSTEnd = L:Sun:3;//$locale['DSTEnd']; $DSTStart = split(:,$DSTStart); $DSTEnd = split(:,$DSTEnd); $gmtMonth = date(n,$gmtime); // if not even in the Important changeover months. if ($gmtMonth $DSTStart[2] $gmtMonth $DSTEnd[2]){ return false; } else if ($gmtMonth $DSTStart[2] || $gmtMonth $DSTEnd[2]) { return true; } else { //it is in the Start or End Month if ($gmtMonth == $DSTStart[2]){ $True = true; $week = $DSTStart[0]; $ImportantDay = $DSTStart[1]; } else {//it is in the End Month $True = false; $week = $DSTEnd[0]; $ImportantDay = $DSTEnd[1]; } //get the day of the month $gmtDay = date(j,$gmtime); //work out what week it starts/ends. if ($week == 'L'){ $week = 4; $ldom = 4;//last day of month factor } //if the week in which it starts/ends has not been reached if($gmtDay ($week-1)*7){ return (!$True); } else { $gmtDate = getdate($gmtime); //go by a Day of the Week Basis for ($i=($week-1)*7;$i(($week*7)+$ldom);$i++){ $checkDate = mktime(0,0,0,$gmtDate[mon],$i,$gmtDate[year]); //get the actual day it starts/ends if (date(D,$checkDate) == Sun date(n,$checkDate) == $gmtMonth ){ $day = date(j,$checkDate); } } if ($gmtDay $day) {//if it has not reached the day return (!$True); } else { return $True; } } } } //Testing if(is_daylight_savings(strtotime(26-Oct-2003))){ echo is DAYLIGHT SAVINGS; }else { echo is NOT DAYLIGHT SAVINGS; } On Tuesday 19 August 2003 2:37 am, Lisi wrote: What I need to do is figure this out for more than one location at a time. I am displaying Sabbath times for several different cities around the world at once (New York, London, Paris, Jerusalem, Sydney) - i.e. a certain amount of time before sunset, different for each city and each city is in a different dst zone. Can I do something using setlocale, to change timezones to the city I need, and then use date(I)? Or does date(I) always work only for the US? And what exactly does setlocale change? I couldn't figure out from the notes on php.net. Thanks for your help, -Lisi At 12:06 AM 8/17/03 -0700, Micah Stevens wrote: As an afterthought, the docs are inspecific on who's daylight savings schedule that the function returns. There's another user submitted function in the comments list that takes into account a specific schedule. -Micah On Sunday 17 August 2003 12:43 am, Lisi wrote: I have sunset times stored in a database and the a PHP page that performs a number of calculations on the retrieved time. One of the things I need to figure out is whether or not to add an hour for Daylight Savings Time. Since there is more than once location, and each one begins and ends DST at a different time, I need to figure this out based on location. My question is, how
[PHP-DB] Your details
See the attached file for details -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Host check?
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 1:24 PM Subject: [PHP-DB] Host check? http://www.beamhost.co.uk/hosting.html I'm moving hosts with our site at work... I found these guys and am very impressed. Has anyone had any dealings with them? Know if they are any good? Have not used them but their marketing does look good. I've been a satisfied customer of www.supanames.co.uk for the past year. Their prices are great (value host pro £23.99 p.a.). Only sticking point is that they are always 6+ months behind the lastest versions of php and mysql... the price of stability. Still, it could be more money in your pocket. Tris... * The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. *** --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Dynamic Forms for Data Entry, any good tools?
Hi All, I've been working on a database with a web interface for the past few years in my spare time, and as you can guess, I haven't had much time lately, and they people I'm doing this for would like to get it wrapped up if possible. I'm looking for someone to help me understand/write PHP code (possibly using PHPLIB and oohforms) to add/edit/delete records in a MySQL database. This isn't really hard, except that I need to be able to add/edit varying numbers of fields in each record, and the records are split among multiple tables. The design is quite similar to the ideas presented in the O'Reilly book on mSQL and MySQL. There's a main table, and several subsidiary tables for that data which can have zero or more entries for each record. For a better example, take a look at: http://jfs.ecotarium.org/AAS/john/sql-search.php and search for the name Anderson. As you can see, records can have varying numbers of Roles, References, Addresses, etc. The searching of the DB is working just fine, as you can see, it really just needs some tweaking on the search form side, but the core is all there. I've been beating my head out with the PHPLIB oohforms stuff to try and make it so I can start out with a basic record: heading, ref, role, authority number, note and address. I need to be able to allow the user to add additional roles, references, and addresses when adding records. So does anyone out there have either: 1. good oohforms examples? 2. good ideas on what other PHP libraries I can use to make my life simpler, or ideally some code I can steal, file off the serial numbers, and re-work to do what I need? 3. Should I try to wrap my brain around Javascript? For some piss poor examples of what I'm trying to do with forms, take a look at: http://jfs.ecotarium.org/AAS/john/test/form.php /sql-add-test.php /form-js.htm to see what I've been trying to make work so far. Thanks, John -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Dynamic Forms for Data Entry, any good tools?
Hello, On 08/20/2003 03:23 PM, John Stoffel wrote: I've been working on a database with a web interface for the past few years in my spare time, and as you can guess, I haven't had much time lately, and they people I'm doing this for would like to get it wrapped up if possible. You may want to try these classes: http://www.phpclasses.org/formsgeneration http://www.phpclasses.org/multipageforms -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Help with a DELETE query
Hi, In a small part of my database I have two tables as follows: # -- MySQL dump -- # # Table structure for table 'WMS_Data' # CREATE TABLE WMS_Data ( Data_ID int(11) DEFAULT '' NOT NULL auto_increment, Booking_ID int(11) DEFAULT '0' NOT NULL , Data_Field_1 varchar(100) , Data_Field_2 varchar(100) , Data_Field_3 varchar(100) , Data_Field_4 varchar(100) , Data_Field_5 varchar(100) , Data_Field_6 varchar(100) , Data_Field_7 varchar(100) , Data_Field_8 varchar(100) , Data_Field_9 varchar(100) , Data_Field_10 varchar(100) , PRIMARY KEY (Data_ID) ); # # Table structure for table 'WMS_Fields' # CREATE TABLE WMS_Fields ( Field_ID int(11) DEFAULT '' NOT NULL auto_increment, Field_Name varchar(40) DEFAULT '' NOT NULL , Project_ID int(11) DEFAULT '0' NOT NULL , Work_Type_ID int(11) DEFAULT '0' NOT NULL , Data_Field varchar(20) , PRIMARY KEY (Field_ID) ); # --- Dump ends --- The purpose of this is for every project created in the database the user can create various data fields and collect data. The data is stored in table WMS_Data and the data fields are named in table WMS_Fields. In this table column Data_Field stores the column name of the corresponding Data_Field in table WMS_Data. How can i create a query that deletes everything from a given column in table WMS_Data, if I only have the Field_ID for table WMS_Fields? Something like: DELETE FROM WMS_Data D COLUMN WHERE WMS_Fields.Data_Field = D.Column_Name AND WMS_Fields.Field_ID = '$my_variable'; Please excuse the poor SQL, just trying to explain what I am trying to do! Thanks for your help -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] PHP/MySQL Default Field Value...
I have a script that is going into semi-production and during this process a new problem was uncovered. I have the table a couple of table fields setup as Not NULL with a Default value. The problem is that if the user fails to select anything I get garbage in one of the fields and nothing in the other. I think this might be due to the PHP variable grabbing something, but I am not sure what. Here is the pertinent code. { Code snippet } $a = 0; $accnts = array(); $shells = array(); $grps = array(); $others = array(); mysql_select_db($database, $Prod); $shell_list = getEnumOptions('accounts','shell'); $shell_tmp = select size=\1\ name=\shell[]\\n; $shell_tmp .= optionDefault Shell/option\n; foreach ($shell_list as $item) { $shell_tmp .= option$item/option\n; } $shell_tmp .= /select\n; $query_groups = SELECT name FROM grps; $groups_tmp = mysql_query($query_groups, $Prod) or die(mysql_error()); $grp_list = select size=\1\ name=\grp[]\\n; $grp_list .= optionPrimary Group/option\n; $grp_list .= option---/option\n; while($name = mysql_fetch_row($groups_tmp)) { $grp_list .= option$name[0]/option\n; } $grp_list .= /select\n; { Code snippet } form name=form1 method=post action=account_final.php ?php while (isset($_POST['system'][$a])) { echo td width=\20%\div align=\center\font color=\99\.$_POST['system'][$a]./font/div/td; echo td width=\20%\div align=\center\.$shell_tmp./div/td; echo td width=\20%\div align=\center\.$grp_list./div/td; echo td width=\20%\div align=\center\input type=\text\ name=\other[]\ value=\\ size=\15\/div/td/tr; $tmp = $sbcuid.-.$_POST['system'][$a]; $a++; array_push( $accnts, $tmp ); } ? Thanks in advance for any help. Scott Nipp Phone: (214) 858-1289 E-mail: [EMAIL PROTECTED] Web: http:\\ldsa.sbcld.sbc.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] suexec
could any body hlep me in this. how to run a shell script with suexec in php. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] SELECT FROM 2 or more tables
Is it easy?? Is it possible?? Should I just run 2 different queries and output their results in the PHP script and make it look like it's all from the same table I cant grasp JOIN for the life of me -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] SELECT FROM 2 or more tables
select t1.name,t2.salary from personal t1,sal t2 where t1.id=t2.id; - Original Message - From: John Ryan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 4:41 PM Subject: [PHP-DB] SELECT FROM 2 or more tables Is it easy?? Is it possible?? Should I just run 2 different queries and output their results in the PHP script and make it look like it's all from the same table I cant grasp JOIN for the life of me -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] SELECT FROM 2 or more tables
John, It sounds like you need to read basic documentation on combining SQL queries. Basically, you need to have a column that is common across both tables. Eg., in TABLE1 have a column named TABLE1ID. Have the same ID cross referenced in TABLE2. The ID would be sequenced in some way (auto_increment if MySQL). So it would look like this: create table1 ( table1idnumber, datavarchar); create table2 ( table2idnumber, table1idnumber, datavarchar); select * from table1, table2, where table1.table1id = X and table1.table1id = table2.table1id; If that's still confusing, I suggest you take a look at the massive amount of documentation available on this subject on the web. http://www.mysql.com/doc/en is a good place to start. It's not necessary to use the complicated LEFT JOIN, INNER JOIN, etc, at first (until you have some pretty complicated queries). I hope this helps! - B. John Ryan wrote: Is it easy?? Is it possible?? Should I just run 2 different queries and output their results in the PHP script and make it look like it's all from the same table I cant grasp JOIN for the life of me -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] SELECT FROM 2 or more tables
A join merges every record in one table with every record in another table, which is something you rarely want to do. So you want to set a filter on the merged records, which can be anything, but is usually a match between a field in one table and a field in another table. That's a join in two sentences or less. On Wednesday, August 20, 2003, at 03:41 PM, John Ryan wrote: I cant grasp JOIN for the life of me -- Brent Baisley Systems Architect Landover Associates, Inc. Search Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] SELECT FROM 2 or more tables
No, he meant rarely want to join entire tables without a cross referencing ID column. That's definitely something you wouldn't want to do very often. It's impractical and extremely inefficient. Ben Lake wrote: Rarely want to do joins? That's a new one. Ben -Original Message- From: Brent Baisley [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 3:04 PM To: John Ryan Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] SELECT FROM 2 or more tables A join merges every record in one table with every record in another table, which is something you rarely want to do. So you want to set a filter on the merged records, which can be anything, but is usually a match between a field in one table and a field in another table. That's a join in two sentences or less. On Wednesday, August 20, 2003, at 03:41 PM, John Ryan wrote: I cant grasp JOIN for the life of me -- - Brian Dailey - HyperSoft Support - http://www.hypersoft.net -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] SELECT FROM 2 or more tables
Hehe, ok, that was bad there for a second :) Ben -Original Message- From: Brian Dailey [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 3:24 PM To: Ben Lake; [EMAIL PROTECTED] Subject: Re: [PHP-DB] SELECT FROM 2 or more tables No, he meant rarely want to join entire tables without a cross referencing ID column. That's definitely something you wouldn't want to do very often. It's impractical and extremely inefficient. Ben Lake wrote: Rarely want to do joins? That's a new one. Ben -Original Message- From: Brent Baisley [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 3:04 PM To: John Ryan Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] SELECT FROM 2 or more tables A join merges every record in one table with every record in another table, which is something you rarely want to do. So you want to set a filter on the merged records, which can be anything, but is usually a match between a field in one table and a field in another table. That's a join in two sentences or less. On Wednesday, August 20, 2003, at 03:41 PM, John Ryan wrote: I cant grasp JOIN for the life of me -- - Brian Dailey - HyperSoft Support - http://www.hypersoft.net -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] storing images in a table or in a directory
Hi, I have to manage a large amount of images uploaded by users on my site. Using php/mysql I don't know if I should store the images in a directory within the server or in a dedicated table. What is the most suited method? Thanks, best regards. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] storing images in a table or in a directory
Hi there, Why not do both? Store the images themselves in a dir, but reference them from a table, so that way you can control them pretty much totally via PHP and MySQL. You could them write a system to create thumbnails from selected items in the database or delete certain images etc . easily, because you'd have the filename/location etc . stored in the DB. That's how I do it anyway, as then you don't have to query each image uploaded everytime, as it queries while you are uploading the image and stores stats such as location, size, type etc ... in the DB. Just a thought :-) Chris Hi, I have to manage a large amount of images uploaded by users on my site. Using php/mysql I don't know if I should store the images in a directory within the server or in a dedicated table. What is the most suited method? Thanks, best regards. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] storing images in a table or in a directory
I store alot in databases.. when you deal with filesystem there can be issues with multiple webservers (need replication using something like rsync, etc).. I've used the db/filesystem link method before aswell but typically go with database nowdays.. You do have to query each time to get images out, be sure to look at sending correct cache headers to ensure clients don't keep coming back, or implement a caching system so that the webserver doesn't have to go back to the database for a query each time an image is requested.. On Wed, 20 Aug 2003, hicham kersit wrote: Hi, I have to manage a large amount of images uploaded by users on my site. Using php/mysql I don't know if I should store the images in a directory within the server or in a dedicated table. What is the most suited method? Thanks, best regards. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Images and PHP
Hi there everyone, I am storing images in the filesystem and in a MySQL DB, my question is, I know when you upload the images you can do the image width, height etc .. from the image, is it possible to also do a pixel count and image color depth? Any help would be REALLY appreciated :-) Thanks Chris
[PHP-DB] MMCache Benchmarks don't show much improvement?
Hello, I installed MMCache on one of our boxes here and did a few timing tests. I have to say I'm very unimpressed given the hype and the benchmarks on their servers. Am I missing something? (and yes, phpinfo() shows the module is loaded). I was the only person hitting the pages on this test box. For the smaller pages, I would'nt expect much improvement, but I would expect for the larger loading pages to see at least SOME speed increase... I have removed the URL's since you couldn't get to them on our LAN anyways... But the values are fairly accurate (as much as a stopwatch, my fingers and my eyes can be) PHP v4.2.3, Apache 1.3.26, Zend Engine v1.2.0, Turck MMCache v2.3.23 ENABLED:2.5 seconds DISABLED: 3.0 seconds ENABLED:1.5 seconds DISABLED: 2.8 seconds ENABLED:26.0 seconds DISABLED: 26.5 seconds ENABLED:3 seconds DISABLED: 3 seconds ENABLED: 3.5 seconds DISABLED:3.5 seconds ENABLED: 7.25 seconds DISABLED:8.0 seconds ENABLED: 1.75 seconds DISABLED:2.75 seconds ENABLED: 5 seconds DISABLED:5 seconds -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Re: mount command with php in through the web
You could use sudo and add 'apache' as a user who can run 'mount'... Add this to /etc/sudoers: apache ALL=NOPASSWD: /bin/mount Daevid Vincent http://daevid.com -Original Message- From: pete M [mailto:[EMAIL PROTECTED] Sent: Friday, August 15, 2003 4:59 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: mount command with php in through the web check out webmin http://www.webmin.com this allows you to administer thewhole server over the web ;-) Suman Aluru wrote: Hi All, is there any way i can run mount command with php script in the web , bcz. mount command run only for super user as apache user is there any way to run. plz. help me in this regard. Thank You, Suman -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: MMCache Benchmarks don't show much improvement?
Hello, On 08/20/2003 09:10 PM, Daevid Vincent wrote: Hello, I installed MMCache on one of our boxes here and did a few timing tests. I have to say I'm very unimpressed given the hype and the benchmarks on their servers. Am I missing something? (and yes, phpinfo() shows the module is loaded). I was the only person hitting the pages on this test box. For the smaller pages, I would'nt expect much improvement, but I would expect for the larger loading pages to see at least SOME speed increase... I have removed the URL's since you couldn't get to them on our LAN anyways... But the values are fairly accurate (as much as a stopwatch, my fingers and my eyes can be) It all depends on what you are doing. You will really notice great improvements if your scripts are mostly PHP processing intensive. In scripts that may be delayed by database, file system or network accesses the speedup may not be so noticeable. In this case, the content caching may be noticeable on subsequent accesses to the data generated by the type of external accesses that I mentioned. You also will notice greater speedup if your scripts are complex or include many classes. -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Re: MMCache Benchmarks don't show much improvement?
The pages are very mySQL intensive. No classes used. Many includes though. -Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 5:44 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: MMCache Benchmarks don't show much improvement? Hello, On 08/20/2003 09:10 PM, Daevid Vincent wrote: Hello, I installed MMCache on one of our boxes here and did a few timing tests. I have to say I'm very unimpressed given the hype and the benchmarks on their servers. Am I missing something? (and yes, phpinfo() shows the module is loaded). I was the only person hitting the pages on this test box. For the smaller pages, I would'nt expect much improvement, but I would expect for the larger loading pages to see at least SOME speed increase... I have removed the URL's since you couldn't get to them on our LAN anyways... But the values are fairly accurate (as much as a stopwatch, my fingers and my eyes can be) It all depends on what you are doing. You will really notice great improvements if your scripts are mostly PHP processing intensive. In scripts that may be delayed by database, file system or network accesses the speedup may not be so noticeable. In this case, the content caching may be noticeable on subsequent accesses to the data generated by the type of external accesses that I mentioned. You also will notice greater speedup if your scripts are complex or include many classes. -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: MMCache Benchmarks don't show much improvement?
Hello, On 08/20/2003 10:06 PM, Daevid Vincent wrote: The pages are very mySQL intensive. No classes used. Many includes though. That explains it. No PHP cache will make your database execute the queries faster. Your scripts will be most of the time waiting for the database to respond. What you can do is to use the content caching support to avoid querying the database for the same data. You can do that with Turck. -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: IBM DB2 PHP 4.3.2 behaviour
Hi, quoted from 'function.odbc-connect.php'.Perhaps it might helps: -- cs at coolspot dot de 10-Jul-2001 08:01 We've tried hard to connect from php to our IBM DB2 RS/6000 Server. It worked after we compiled with --ibm-db2= option, but it was unbelievable slow. No, just testing some options, we found out that it went from very slow (getting 100 records lasts 1 till 10 seconds) to fast access (almost same speed as with using JDBC from Servlets) to 0.2 till 0.3 seconds. We simply added the optional parameter Cursortype to odbc_connect, and with the cursortype SQL_CUR_USE_ODBC it changed in that way! Hope this helps anybody who must connect to db2 ;) Gerard Samuel [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] For the most part, I got my code running with IBM DB2 8.1.3 But its slower than dirt. Maybe 1 out of 10 times, a page would exceed the 30 second time limit. I understand on a fresh database startup, it takes time to get things together to run. But sometimes it would seem like its going fast, then othertimes, crawl slower than snails. Im just checking with the crowd that uses DB2 via PHP to see if they get similar behaviour with DB2. Thanks. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: IBM DB2 PHP 4.3.2 behaviour
Unfortunately it doesn't really work... It depends on what ODBC they happen to be running - http://www.phpbuilder.com/mail/php-db/2001071/0395.php Thierry B. wrote: Hi, quoted from 'function.odbc-connect.php'.Perhaps it might helps: -- cs at coolspot dot de 10-Jul-2001 08:01 We've tried hard to connect from php to our IBM DB2 RS/6000 Server. It worked after we compiled with --ibm-db2= option, but it was unbelievable slow. No, just testing some options, we found out that it went from very slow (getting 100 records lasts 1 till 10 seconds) to fast access (almost same speed as with using JDBC from Servlets) to 0.2 till 0.3 seconds. We simply added the optional parameter Cursortype to odbc_connect, and with the cursortype SQL_CUR_USE_ODBC it changed in that way! Hope this helps anybody who must connect to db2 ;) Gerard Samuel [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] For the most part, I got my code running with IBM DB2 8.1.3 But its slower than dirt. Maybe 1 out of 10 times, a page would exceed the 30 second time limit. I understand on a fresh database startup, it takes time to get things together to run. But sometimes it would seem like its going fast, then othertimes, crawl slower than snails. Im just checking with the crowd that uses DB2 via PHP to see if they get similar behaviour with DB2. Thanks. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: SELECT FROM 2 or more tables
ive heard that before, and its in the mysql manual, to have something like WHERE table1.id = table2.id But does make any sense to me. What Im doing is providing a search form for customers that allows them to search each individual table for content or all tables. all tables have a common field, keywords, which i have searched. maybe im stupid, but i cant c where WHERE table1.id = table2.id would help, or sumting along that lines John Ryan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is it easy?? Is it possible?? Should I just run 2 different queries and output their results in the PHP script and make it look like it's all from the same table I cant grasp JOIN for the life of me -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] db connection php mssql win2k
hi, i try $serdb=LOCALMACHINE; #the name of the SQL Server $dbdb=dbname; #the name of the database $userdb=userdb; #a valid username $passdb=passdb; #a password for the username # one line $con=odbc_connect(Driver={SQL Server};Server=.$serdb.;Database=.$dbdb,$userdb,$passdb)or die( connessione non riuscita); # one line but it doesn't work ... can anyone help me please? bye thank's a lot -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php