Re: [PHP] Converting SQL Dialects

2009-07-21 Thread Paul M Foster
On Tue, Jul 21, 2009 at 06:54:35PM +0100, Ashley Sheridan wrote: > On Tue, 2009-07-21 at 13:46 -0400, Matt Neimeyer wrote: > > Has anyone come across / written a script that will convert one > > "flavor" or Dialect of SQL to another? > > > > I need to convert Visual FoxPro 6.0 style WHERE clauses

Re: [PHP] newbie - Is there a calendar module for date entry?

2009-07-21 Thread Jonathan Tapicer
On Tue, Jul 21, 2009 at 10:06 PM, c...@hosting4days.com wrote: > newbie ... > > - is there a calendar module for date fields? > > - so that a small calendar pops up - then you can click on a date,  to add > to a field - like google or yahoo calendars has...? > > BTW: I saw this - but it doesn't see

[PHP] newbie - Is there a calendar module for date entry?

2009-07-21 Thread c...@hosting4days.com
newbie ... - is there a calendar module for date fields? - so that a small calendar pops up - then you can click on a date, to add to a field - like google or yahoo calendars has...? BTW: I saw this - but it doesn't seem to be the right thing ( more meant for Converter issues) for what I'

Re: [PHP] Back again with query problems and row problems

2009-07-21 Thread Jim Lucas
Miller, Terion wrote: > Okay I'm back guys...not sure what happened it was working..now it's all hung > up... > Here are the errors: > > Warning: mysql_num_rows(): supplied argument is not a valid MySQL result > resource in > /var/www/vhosts/getpublished.news-leader.com/httpdocs/ResturantInspec

Re: [PHP] Doubt regarding session_destroy() in PHP 5

2009-07-21 Thread Lenin
On Wed, Jul 22, 2009 at 3:24 AM, L.Guruprasad wrote: > Hi, > Floyd Resler wrote: > >> Keep in mind that sessions are based on the domain. I've run into >> situations where someone will be working in several different sites that we >> host. Each site is accessed via http://domain/site. Each sit

Re: [PHP] Doubt regarding session_destroy() in PHP 5

2009-07-21 Thread Devendra Jadhav
By default sub-domains do not share sessions but you can make them to share the session On Wed, Jul 22, 2009 at 1:54 AM, L.Guruprasad wrote: > Hi, > Floyd Resler wrote: > >> Keep in mind that sessions are based on the domain. I've run into >> situations where someone will be working in several

[PHP] Back again with query problems and row problems

2009-07-21 Thread Miller, Terion
Okay I'm back guys...not sure what happened it was working..now it's all hung up... Here are the errors: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/getpublished.news-leader.com/httpdocs/ResturantInspections/restaurants.php on line 464

Re: [PHP] Doubt regarding session_destroy() in PHP 5

2009-07-21 Thread L.Guruprasad
Hi, Floyd Resler wrote: Keep in mind that sessions are based on the domain. I've run into situations where someone will be working in several different sites that we host. Each site is accessed via http://domain/site. Each site has it's own database, users, etc. However, because they all ha

Re: [PHP] Doubt regarding session_destroy() in PHP 5

2009-07-21 Thread Floyd Resler
Keep in mind that sessions are based on the domain. I've run into situations where someone will be working in several different sites that we host. Each site is accessed via http://domain/site. Each site has it's own database, users, etc. However, because they all hang off the same doma

Re: [PHP] Doubt regarding session_destroy() in PHP 5

2009-07-21 Thread Phpster
On Jul 21, 2009, at 3:12 PM, Guruprasad wrote: Hi all, I have a doubt with creating and destroying sessions in PHP using session_destroy(). Supposing there is a PHP-based website hosted on a web server. Now I add another site that I developed using PHP on that web server using virtualho

Re: [PHP] Doubt regarding session_destroy() in PHP 5

2009-07-21 Thread Devendra Jadhav
Yes. You are right. Session variables are associated with the session id so only that appropriate website's session variables will get destroyed. You can try it in your local system. On Wed, Jul 22, 2009 at 12:42 AM, Guruprasad wrote: > Hi all, > I have a doubt with creating and destroying sessi

[PHP] Doubt regarding session_destroy() in PHP 5

2009-07-21 Thread Guruprasad
Hi all, I have a doubt with creating and destroying sessions in PHP using session_destroy(). Supposing there is a PHP-based website hosted on a web server. Now I add another site that I developed using PHP on that web server using virtualhost. I destroy a session in my website using session_de

[PHP] Re: How to set find pathes for PHP CLI?

2009-07-21 Thread Shawn McKenzie
Tir wrote: > I have many scripts that I need execute with PHP CLI. They are located in a > few directories. I don't want to write full path to script every time when I > start it. Therefore I've added this paths to the PATH environment variable. > But PHP don't find my scripts. How could i set p

Re: [PHP] A prepared statements question

2009-07-21 Thread Shawn McKenzie
Jim Lucas wrote: > Jason Carson wrote: >>> Hello everyone, >>> >>> I am having a problem getting my prepared statements working. Here is my >>> setup... >>> >>> index.php -> authenticate.php -> admin.php >>> >>> 1)index.php has a login form on it so when someone enters their username >>> the fo

[PHP] Re: RFC/Survey for Our Newer Folks (Including Lurkers)

2009-07-21 Thread Shawn McKenzie
Daniel P. Brown wrote: > Ladies and Gentlemen: > Daniel P. Brown: I originally found it here: http://www.php.net/mailing-lists.php when I was looking for responsive help, and have always accessed it via a newsgroup on news.php.net instead of as a mailing list. The news server times out quit

Re: [PHP] PHP and FoxPro

2009-07-21 Thread Floyd Resler
Matt, Thanks for the tip on handling memos. I always thought, "If I could just append to the end of the existing string..." but never figured out how to do it. I'll give your method a shot. Thanks! Floyd On Jul 21, 2009, at 2:04 PM, Matt Neimeyer wrote: What I did to handle memos... an

Re: [PHP] Converting SQL Dialects

2009-07-21 Thread Andrew Ballard
On Tue, Jul 21, 2009 at 2:13 PM, Matt Neimeyer wrote: > Um... It depends? :) These are customer entered queries and vary based > on the end user and the customizations they have. It could be as > simple as WHERE inlist(SalesPerson,"Bob","Bill","Fred") OR it could be > something 12 lines long that p

Re: [PHP] Converting SQL Dialects

2009-07-21 Thread Matt Neimeyer
Um... It depends? :) These are customer entered queries and vary based on the end user and the customizations they have. It could be as simple as WHERE inlist(SalesPerson,"Bob","Bill","Fred") OR it could be something 12 lines long that pulls in criteria from multiple tables each of those with their

Re: [PHP] PHP and FoxPro

2009-07-21 Thread Matt Neimeyer
What I did to handle memos... and it's a HACK... was to create a function DoMemo that took as arguments the table, the primary key field of the table, the value of said pk, the field to update, and the string. Take the first 200 characters of the string. Replace all newlines in that substring with

Re: [PHP] Search Query on two tables not working (RESOLVED)

2009-07-21 Thread Miller, Terion
Yep, sure was the spacesOMG...will I ever get it... On 7/21/09 12:29 PM, "Ashley Sheridan" wrote: On Tue, 2009-07-21 at 13:24 -0400, Andrew Ballard wrote: > On Tue, Jul 21, 2009 at 1:20 PM, Miller, > Terion wrote: > > Here it is...I see where it's doing the restaurant.name LIKE statement 2x

Re: [PHP] Converting SQL Dialects

2009-07-21 Thread Ashley Sheridan
On Tue, 2009-07-21 at 13:46 -0400, Matt Neimeyer wrote: > Has anyone come across / written a script that will convert one > "flavor" or Dialect of SQL to another? > > I need to convert Visual FoxPro 6.0 style WHERE clauses to MySQL. > > For the most part the problems are converting VFP functions

[PHP] Converting SQL Dialects

2009-07-21 Thread Matt Neimeyer
Has anyone come across / written a script that will convert one "flavor" or Dialect of SQL to another? I need to convert Visual FoxPro 6.0 style WHERE clauses to MySQL. For the most part the problems are converting VFP functions to the equivalent SQL. For example, Visual FoxPro has a function inl

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Ashley Sheridan
On Tue, 2009-07-21 at 13:24 -0400, Andrew Ballard wrote: > On Tue, Jul 21, 2009 at 1:20 PM, Miller, > Terion wrote: > > Here it is...I see where it's doing the restaurant.name LIKE statement 2x > > which is prob messing it up right...but in the code why is it doing that > > twice.. > > > > SELECT

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Ashley Sheridan
On Tue, 2009-07-21 at 12:59 -0400, Miller, Terion wrote: > > > On 7/21/09 11:47 AM, "Dan Shirah" wrote: > > Why isn't this working for searching? > > // Run query on submitted values. Store results in $SESSION and redirect to > restaurants.php$sql = "SELECT name, address, inDate, in

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Andrew Ballard
On Tue, Jul 21, 2009 at 1:20 PM, Miller, Terion wrote: > Here it is...I see where it's doing the restaurant.name LIKE statement 2x > which is prob messing it up right...but in the code why is it doing that > twice.. > > SELECT name, address, inDate, inType, notes, critical, cviolations, > noncri

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Ashley Sheridan
On Tue, 2009-07-21 at 10:07 -0700, Miller, Terion wrote: > > > On 7/21/09 12:04 PM, "Ashley Sheridan" wrote: > > On Tue, 2009-07-21 at 12:59 -0400, Miller, Terion wrote: > > > > > > On 7/21/09 11:47 AM, "Dan Shirah" wrote: > > > > Why isn't this working for searching? > > > > // Run query on

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Miller, Terion
Here it is...I see where it's doing the restaurant.name LIKE statement 2x which is prob messing it up right...but in the code why is it doing that twice.. SELECT name, address, inDate, inType, notes, critical, cviolations, noncritical FROM restaurants, inspections WHERE restaurants.name <> '' AN

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Dan Shirah
On Tue, Jul 21, 2009 at 12:41 PM, Miller, Terion < tmil...@springfi.gannett.com> wrote: > Turned off the redirects on the whole script and tried to the the query to > echo and these are the errors I got: > > Notice: Undefined offset: 1 in /var/www/vhosts/ > getpublished.news-leader.com/httpdocs/Re

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Miller, Terion
Turned off the redirects on the whole script and tried to the the query to echo and these are the errors I got: Notice: Undefined offset: 1 in /var/www/vhosts/getpublished.news-leader.com/httpdocs/ResturantInspections/processRestaurantSearch.php on line 89 Warning: mysql_fetch_array(): supplie

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Miller, Terion
On 7/21/09 12:04 PM, "Ashley Sheridan" wrote: On Tue, 2009-07-21 at 12:59 -0400, Miller, Terion wrote: > > > On 7/21/09 11:47 AM, "Dan Shirah" wrote: > > Why isn't this working for searching? > > // Run query on submitted values. Store results in $SESSION and redirect to > restaurants.php

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Miller, Terion
On 7/21/09 11:47 AM, "Dan Shirah" wrote: Why isn't this working for searching? // Run query on submitted values. Store results in $SESSION and redirect to restaurants.php$sql = "SELECT name, address, inDate, inType, notes, critical, cviolations, noncritical FROM restaurants, inspe

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Dan Shirah
> > Why isn't this working for searching? > > // Run query on submitted values. Store results in $SESSION and redirect > to restaurants.php$sql = "SELECT name, address, inDate, inType, > notes, critical, cviolations, noncritical FROM restaurants, inspections > WHERE restaurants.name <> ''

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Andrew Ballard
On Tue, Jul 21, 2009 at 12:26 PM, Miller, Terion wrote: > Why isn't this working for searching? Check your concatenation in the query. You need some white space padding your SQL segments, otherwise the text all starts to run together. (I had to reformat it. For some reason, most of the code snip

[PHP] Search Query on two tables not working

2009-07-21 Thread Miller, Terion
Why isn't this working for searching? // Run query on submitted values. Store results in $SESSION and redirect to restaurants.php$sql = "SELECT name, address, inDate, inType, notes, critical, cviolations, noncritical FROM restaurants, inspections WHERE restaurants.name <> '' AND rest

Re: [PHP] putting variables in a variable

2009-07-21 Thread Mark Kelly
Ross, If I understand correctly what you want to do, you're almost there... You need: $myimage1 = "image1.jpg"; $myimage2 = "image2.jpg"; $myimage3 = "image3.jpg"; $body .=" "; Cheers, Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] Re: Traffic throttling

2009-07-21 Thread Michelle Konzack
Hello Stuart, Am 2009-07-21 16:39:30, schrieb Stuart: > http://php.net/usleep Thank you, that it was. Greetings and nice Day/Evening Michelle Konzack Systemadministrator Tamay Dogan Network Debian GNU/Linux Consultant -- Linux-User #280138 with the Linux Counter, http://counter

Re: [PHP] Traffic throttling

2009-07-21 Thread דניאל דנון
I am not sure I understood you, But... Use microtime(true/false) to get the time, And usleep to sleep milliseconds On Tue, Jul 21, 2009 at 6:31 PM, Michelle Konzack < linux4miche...@tamay-dogan.net> wrote: > Hello, > > since I have not the file store in my webspace for security reason, I > us

Re: [PHP] Traffic throttling

2009-07-21 Thread Stuart
2009/7/21 Michelle Konzack : > since I have not the file store in my webspace  for  security  reason,  I > use a php5 script to push it out.  It even support "resumeing". > > some times ago, there was someone who told me to send out the  files  in > chunks of, e.g. 1 kByte, which let me know to cou

[PHP] Traffic throttling

2009-07-21 Thread Michelle Konzack
Hello, since I have not the file store in my webspace for security reason, I use a php5 script to push it out. It even support "resumeing". some times ago, there was someone who told me to send out the files in chunks of, e.g. 1 kByte, which let me know to count the REAL traffic a client

Re: [PHP] PHP and FoxPro

2009-07-21 Thread Floyd Resler
Matt, Thanks for the information. I'll look into using ODBTP. I noticed you mentioned the problem with memos. I currently have that problem with the set up we're using and it is a pain! Thanks! Floyd On Jul 20, 2009, at 3:22 PM, Matt Neimeyer wrote: We currently use the Easysoft ODBC B

Re: [PHP] running php script as a user?

2009-07-21 Thread Maximiliano Churichi
sudo -u user command 2009/7/15 Adam Williams : > I have a page where a user authenticates, fills in some information in an > HTML form, and then when clicking on the submit button, will need to execute > a php schell script as that user to write some data to their /home/username > directory.  Sinc