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"
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.
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
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');
>
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 .= '
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
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
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
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
> 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
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
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
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?.
>
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
--
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
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
-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
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
"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
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
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
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
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 ~
--
> 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
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
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
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
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 ~
--
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
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
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..
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
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.
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..
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."
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
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
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
>
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
;[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
; 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
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
___
Adrian D'Costa wrote:
> Hi,
>
> I have two tables city and country
> +---+-+--+-+-++
> | Field | Type| Null | Key | Default | Extra |
> +---+-+--+-+-++
> | id
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
Hi,
I have two tables city and country
+---+-+--+-+-++
| Field | Type| Null | Key | Default | Extra |
+---+-+--+-+-++
| id| int(5) | | PRI | 0 | aut
45 matches
Mail list logo