Re: PHP Question

2008-05-06 Thread Darryle steplight
n [mailto:[EMAIL PROTECTED] > >Sent: Tuesday, May 06, 2008 10:39 AM > >To: mysql@lists.mysql.com > >Subject: PHP Question > > > >I have a PHP script that seems to be failing. I execute it using > >window.location.href("http://www.vote.com/vote2.php"

RE: PHP Question

2008-05-06 Thread Jerry Schwartz
rated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 www.the-infoshop.com www.giiexpress.com www.etudes-marche.com >-Original Message- >From: Michael Condon [mailto:[EMAIL PROTECTED] >Sent: Tuesday, May 06, 2008 10:39 AM >To: mysql@lists.mysql.

Re: PHP Question

2008-05-06 Thread Stut
On 6 May 2008, at 15:39, Michael Condon wrote: I have a PHP script that seems to be failing. I execute it using window.location.href("http://www.vote.com/vote2.php";): $result = mysql_query("update election set Votes = Votes + 1 where Name='TheGuy'"); if (!$result) { $message = 'Invalid up

Re: PHP Question

2008-05-06 Thread Salah Nait-Mouloud
Hi. try this or this regards On Tue, May 6, 2008 at 4:39 PM, Michael Condon <[EMAIL PROTECTED]> wrote: > I have a PHP script that seems to be failing. I execute it using > window.location.href("http://www.vote.com/vote2.php";): > > $link = mysql_connect('localhost', 'login', 'password'); >

PHP Question

2008-05-06 Thread Michael Condon
I have a PHP script that seems to be failing. I execute it using window.location.href("http://www.vote.com/vote2.php";): $result = mysql_query("update election set Votes = Votes + 1 where Name='TheGuy'"); if (!$result) { $message = 'Invalid update: ' . mysql_error() . "\n"; $message .= '

Re: Newbie MySQL/PHP question re output formatting

2005-09-13 Thread Jasper Bryant-Greene
Nuno Pereira wrote: To do date change the first line from printf(" number_format({$thearray[cost]}, 2) to printf(" ".number_format({$thearray[cost]}, 2)." I think you mean: print( "" . number_format( $thearray['cost'], 2 ) . "" ); As stated by a previous poster to this thread, you should

Re: Newbie MySQL/PHP question re output formatting

2005-09-13 Thread Nuno Pereira
Bill Whitacre wrote: I can get this to work just fine: Comes out $23,999.39 I'd like use the number_format() thingie on an array returned from a mysql_query. My current program snippet looks like: $res = mysql_query("SELECT org, COUNT(*), SUM(annual_cost) AS cost FROM a05

Re: Newbie MySQL/PHP question re output formatting

2005-09-13 Thread Jigal van Hemert
Bill Whitacre wrote: printf(" {$thearray[org]} {$thearray["COUNT(*)"]} $ {$thearray[cost]} "); If I replace {$thearray[cost]} with number_format({$thearray[cost]}, 2) Although this is a MySQL mailing list and your problem is not MySQL related

Newbie MySQL/PHP question re output formatting

2005-09-13 Thread Bill Whitacre
I can get this to work just fine: Comes out $23,999.39 I'd like use the number_format() thingie on an array returned from a mysql_query. My current program snippet looks like: $res = mysql_query("SELECT org, COUNT(*), SUM(annual_cost) AS cost FROM a05 GROUP BY org ORDER BY

Re: quick PHP question

2003-08-30 Thread Greg Donald
> Unfortunately I want my darn PHP web page to do this calculation and > spit it out with my other run data but I can not find any useful PHP > function similar to MySQL's sec_to_time() or time_to_sec(). Nor can I > make mktime() do anything useful here. You probably want strtotime(), it can do t

quick PHP question

2003-08-30 Thread Trevor Smith
I'm trying to do some mathematics using a time value in PHP. It's dead simple in MySQL: mysql> select date, duration, miles, sec_to_time(time_to_sec(duration) / miles) as speed from runs where shoes=6 order by date; ++--+---+--+ | date | duration | miles | spe

Re: Apache/PHP question

2003-03-14 Thread Sherwin T. Ang
nter Pasig City 1605 Philippines Phone: 6345140 Local 1024 Web: http://www.tridel.net Email: [EMAIL PROTECTED] - Original Message - From: "Defryn, Guy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 14, 2003 9:38 AM Subject: Apache/PHP question I h

Re: Apache/PHP question

2003-03-13 Thread Ben Balbo
Hi Guy, Try sticking this in the relevant VirtualHost directive: php_flag engine off HTH Ben In response to your mail sent on Friday, March 14, 2003 at 12:38:19 PM. > I have set apache 2.0 and PHP 4.3.1 as well as mysql. > I was wondering how I can disable PHP per user directory?. >

Apache/PHP question

2003-03-13 Thread Defryn, Guy
I have set apache 2.0 and PHP 4.3.1 as well as mysql. I was wondering how I can disable PHP per user directory?. At the moment everyone can put php scripts on their personal website. I want to limit it to a few users. Cheers Sql,query --

RE: Part Mysql part PHP question....

2003-03-08 Thread Roger Davis
d = 'Y'; Hope this helps. Roger -Original Message- From: C. Reeve [mailto:[EMAIL PROTECTED] Sent: Saturday, March 08, 2003 6:44 PM To: MySQL List Subject: Part Mysql part PHP question Hi, I have a hockey database with players names in it and I want to be able to update their st

Part Mysql part PHP question....

2003-03-08 Thread C. Reeve
Hi, I have a hockey database with players names in it and I want to be able to update their stats one after the other. To be more clear - when the page is first entered I want the first players name to automatically appear showing his current stats (this will be in a form). Then you can update the

Re: A mysql php question

2003-01-19 Thread Stefan Hinz, iConnect \(Berlin\)
-3 - Original Message - From: "Ryan McDougall" <[EMAIL PROTECTED]> To: "mysql" <[EMAIL PROTECTED]> Sent: Sunday, January 19, 2003 6:47 PM Subject: A mysql php question > Hello everyone, > > I'm not sure if this is the proper place to be asking

A mysql php question

2003-01-19 Thread Ryan McDougall
Hello everyone, I'm not sure if this is the proper place to be asking this question as I believe it is more of a question on how to traverse through php arrays and such but it is using a mysql_query function. So if this not the place pleace don't read any further and ignore and/or delete this mess

Re: MySQL and PHP question

2002-12-18 Thread C. Reeve
"MySQL List" <[EMAIL PROTECTED]> Sent: Wednesday, December 18, 2002 1:32 AM Subject: Re: MySQL and PHP question > On Wed, 18 Dec 2002 22:54:53 -0500, C. Reeve wrote: > >while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { > >$num1 = $line['number

Re: MySQL and PHP question

2002-12-17 Thread Steve Yates
On Wed, 18 Dec 2002 22:54:53 -0500, C. Reeve wrote: >while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { >$num1 = $line['number']; >} Loop through the result and return the value from the last row? Did you want "select sum(number) as SubTotal1 from table1 where userid=$user1

Re: MySQL and PHP question

2002-12-17 Thread C. Reeve
ge - From: "Steve Yates" <[EMAIL PROTECTED]> To: "MySQL List" <[EMAIL PROTECTED]> Sent: Tuesday, December 17, 2002 5:12 PM Subject: Re: MySQL and PHP question > On Wed, 18 Dec 2002 16:05:35 -0500, C. Reeve wrote: > > >I can not use two mysql queries

RE: MySQL and PHP question

2002-12-17 Thread Fraser Stuart
List | Subject: MySQL and PHP question | | | Hi, | | Why is it that I can not use two mysql queries in the same PHP | file. I have | tried to do this several times trying to put my site together and have had | nothing but problems. | | The recent one is this: | | I use a SELECT statement to get some

Re: MySQL and PHP question

2002-12-17 Thread Steve Yates
On Wed, 18 Dec 2002 16:05:35 -0500, C. Reeve wrote: >I can not use two mysql queries in the same PHP file Please post code snippets, this is possible. - Steve Yates - Burger Borg: We do it our way; yours is irrelevant. ~ Taglines by Taglinator - www.srtware.com ~ --

Re: MySQL and PHP question

2002-12-17 Thread Chris Boget
> Why is it that I can not use two mysql queries in the same PHP file. You can, I assure you. > Any info is appreciated. Perhaps if you could provide your code? W/o it there is no way we can determine where the problem might be coming from. Chris

MySQL and PHP question

2002-12-17 Thread C. Reeve
Hi, Why is it that I can not use two mysql queries in the same PHP file. I have tried to do this several times trying to put my site together and have had nothing but problems. The recent one is this: I use a SELECT statement to get some info from a table, then I modify that info and use an UPDA

Re: Select, mysql_fetch_array, PHP question

2002-12-03 Thread Beauford.2003
o: "Beauford.2003" <[EMAIL PROTECTED]> Sent: Tuesday, December 03, 2002 7:41 PM Subject: Re: Select, mysql_fetch_array, PHP question > Maybe you have an "if ($line = mysql_fetch_array($result))" line > somewhere up above? That would cause the while loop to skip

Re: Select, mysql_fetch_array, PHP question (sorry - typo in my original email)

2002-12-03 Thread Beauford.2003
Sorry, where it says echo $item should have read echo $line['item']; Simply a typo, but the problem is still the same. Hi, I'm trying to do a search on database through a web interface using PHP and having one small problem. Example: If I search for items that cost $5.00 and there are three of th

Re: Select, mysql_fetch_array, PHP question

2002-12-03 Thread Steve Yates
On Tue, 3 Dec 2002 08:38:59 -0500, Beauford.2003 wrote: > while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { > echo $item; } Try echo $line['item']; - Steve Yates - Any sufficiently advanced magic looks like technology. ~ Taglines by Taglinator - www.srtware.com ~ --

RE: Select, mysql_fetch_array, PHP question

2002-12-03 Thread Jennifer Goodie
lto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 5:39 AM To: [EMAIL PROTECTED] Subject: Select, mysql_fetch_array, PHP question Hi, I'm trying to do a search on database through a web interface using PHP and having one small problem. Example: If I search for items that cost $5.00 and

Select, mysql_fetch_array, PHP question

2002-12-03 Thread Beauford.2003
Hi, I'm trying to do a search on database through a web interface using PHP and having one small problem. Example: If I search for items that cost $5.00 and there are three of them, the query works and displays the information, but if there is only one item the query works but doesn't display the

Re: mysql php question

2002-06-24 Thread Gerald R. Jensen
1:16 PM Subject: mysql php question Does anyone have some simple sample code using php to access a mySQL database? Could you post it or send someit to me please? Taylor Lewick Unix System Administrator Fortis Benefits 816 881 6073 "Help Wanted. Seeking Telepath..

RE: mysql php question

2002-06-24 Thread Cal Evans
The one at www.php.net -Original Message- From: Taylor Lewick [mailto:[EMAIL PROTECTED]] Sent: Monday, June 24, 2002 1:50 PM To: [EMAIL PROTECTED] Subject: Re: mysql php question gotcha, thanks, which manual is that? Taylor Lewick Unix System Administrator Fortis Benefits 816 881

Re: mysql php question

2002-06-24 Thread Taylor Lewick
gotcha, thanks, which manual is that? Taylor Lewick Unix System Administrator Fortis Benefits 816 881 6073 "Help Wanted. Seeking Telepath..." "You Know where to apply." >>> [EMAIL PROTECTED] 06/24/02 01:39PM >>> in the php manual in the section of functions about mysql, it has a few examples.

Re: mysql php question

2002-06-24 Thread Larry Irwin
Sent: Monday, June 24, 2002 2:16 PM Subject: mysql php question Does anyone have some simple sample code using php to access a mySQL database? Could you post it or send someit to me please? Taylor Lewick Unix System Administrator Fortis Benefits 816 881 6073 "Help Wanted. Seeking Telepath..

mysql php question

2002-06-24 Thread Taylor Lewick
Does anyone have some simple sample code using php to access a mySQL database? Could you post it or send someit to me please? Taylor Lewick Unix System Administrator Fortis Benefits 816 881 6073 "Help Wanted. Seeking Telepath..." "You Know where to apply."

Re: PHP Question

2002-04-11 Thread BD
At 09:13 AM 4/11/2002, you wrote: >Ok so this really doesnt have anything to do with MySQL but I thought this >might be a good placeto ask. >Ok heres the problem. I am constructing a Message Board with MySQL and php >(was usingASP) and I dont want the user to reload/repost data. For >example, say

RE: PHP Question

2002-04-11 Thread Andreas Frøsting
Hi, > Ok so this really doesnt have anything to do with MySQL but I > thought this > might be a good placeto ask. Why? As you say, it's not in any way related to MySQL. > reload the page and postthe message again! doh! > Anyways, has anyone come up against a similar problem and found a > way a

Re: PHP Question

2002-04-11 Thread Tyler Longren
t puts the post into the db. Tyler - Original Message - From: "Nick Stuart" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 11, 2002 9:13 AM Subject: PHP Question > Ok so this really doesnt have anything to do with MySQL but I thought this >

PHP Question

2002-04-11 Thread Nick Stuart
Ok so this really doesnt have anything to do with MySQL but I thought this might be a good placeto ask. Ok heres the problem. I am constructing a Message Board with MySQL and php (was usingASP) and I dont want the user to reload/repost data. For example, say the user goes to post amessage, after t

Re: database/php question

2001-08-18 Thread D'Arcy Rittich
;[EMAIL PROTECTED]> Sent: Sunday, August 19, 2001 2:02 AM Subject: database/php question > This is kinda off topic, but, I have a mysql database and I am generating an > html table from one of my queries. I want to be able to download this html > table, but in excel format. Any suggest

Re: database/php question

2001-08-18 Thread Gary Huntress
; Huntress === FreeSQL.org offering free database hosting to developers Visit http://www.freesql.org:27960 (AT&T is currently blocking 80 and 8080) - Original Message - From: "Kit Kerbel" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, August 19, 2001 2:02 AM Sub

database/php question

2001-08-18 Thread Kit Kerbel
This is kinda off topic, but, I have a mysql database and I am generating an html table from one of my queries. I want to be able to download this html table, but in excel format. Any suggestions on a way to do this? Thanks, Kit ___

Re: MySQL and PHP Question

2001-02-08 Thread Ing . Alejandro Vázquez C .
Adrian D'Costa wrote: > Hi, > > I have two tables city and country > +---+-+--+-+-++ > | Field | Type| Null | Key | Default | Extra | > +---+-+--+-+-++ > | id

RE: MySQL and PHP Question

2001-02-08 Thread Cal Evans
Cal http://www.calevans.com -Original Message- From: Adrian D'Costa [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 06, 2001 12:01 AM To: [EMAIL PROTECTED] Subject: MySQL and PHP Question Hi, I have two tables city a

MySQL and PHP Question

2001-02-07 Thread Adrian D'Costa
Hi, I have two tables city and country +---+-+--+-+-++ | Field | Type| Null | Key | Default | Extra | +---+-+--+-+-++ | id| int(5) | | PRI | 0 | aut