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, but a PHP question I'
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
Hi,
Am a newbie to mysql.
I am trying to deploy mysql database server on a windows machine and
update this
database from a remote linux machine(client) periodically.
The connection to mysql server in windows is failing when i run the
client program at mysql_real_connect (). Am using
mys
Just turn your subquery into another join
SELECT C2.City, N.Distance
FROM Cities C
INNER JOIN Nbc N ON C.CityID = N.PrimaryCityID
INNER JOIN Cities C2 ON C2.cityID = N.CityID
WHERE C.City = 'Los Angeles'
AND N.Distance <20
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
G
strangely, the query works intermittently :(
SELECT (
SELECT City
FROM Cities
WHERE CityId = N.CityId
), N.Distance
FROM Cities C
JOIN Nbc N ON C.CityId = N.PrimaryCityId
WHERE C.City = 'Los Angeles'
AND N.Distance <20
sometimes it works...other times it gives the mysql query error:
show keys from
In the simple query...
the city field showed the result 'Los Angeles' in every row
the distance field showed incorrect results to :(
City| Distance
Los Angeles 18
Los Angeles 5
Los Angeles 7
...
On Apr 1, 2005, at 1:59 PM, Peter Brawle
What was wrong with Graham's simpler query?
PB
-
Graham Anderson wrote:
I upgraded my local mysql version to 4.1.10a and the below query
finally works :)
How can I now amend the query so it works on my remote server running
mysql 3.23.58 ? From one headache to another ;)
SELECT (
SELECT Cit
I upgraded my local mysql version to 4.1.10a and the below query
finally works :)
How can I now amend the query so it works on my remote server running
mysql 3.23.58 ? From one headache to another ;)
SELECT (
SELECT City
FROM Cities
WHERE CityID = N.CityID
), N.Distance
FROM Cities C
JOIN Nbc N
Graham Anderson wrote:
What is the proper way to say this ?
SELECT C.City, N.Distance
FROM Cities C
JOIN Nearbycities N ON C.CityId =ci N.PrimaryCityId
WHERE N.CityId =
(SELECT Cities.CityId FROM Cities WHERE Cities.city = 'Los Angeles')
AND N.distance < 20
I am trying to enter in a city and get a
What is the proper way to say this ?
SELECT C.City, N.Distance
FROM Cities C
JOIN Nearbycities N ON C.CityId = N.PrimaryCityId
WHERE N.CityId =
(SELECT Cities.CityId FROM Cities WHERE Cities.city = 'Los Angeles')
AND N.distance < 20
I am trying to enter in a city and get all the nearby cites with
Graham Anderson wrote:
My server has mysql: version 3.23.58
// Performing SQL query
SELECT cities.city, regions.region, countries.country
FROM cities
JOIN subnets on subnets.cityid=subnets.cityid
^^^
Shouldn't that be
JOIN subnets on subnets.cityid=cities.
My server has mysql: version 3.23.58
// Performing SQL query
SELECT cities.city, regions.region, countries.country
FROM cities
JOIN subnets on subnets.cityid=subnets.cityid
JOIN regions on subnets.regionid=regions.regionid
JOIN countries on subnets.countryid=countries.countryid
where subnets.
hi,
i want to configure a two-machines mysql clusters. i have compiled from
source by enabling the clustering feature with no problem at all. i read
the documentation on mysql. but, i am not understanding on how to make a
simple mysql cluster. basically, i just want to have a kickstart. that's
Aaron,
You aren't trapping errors on mysql_connect().
Try this:
mysql_connect($host,$user,$password)
or die(mysql_error());
-Eric
On Mon, 6 Dec 2004 19:13:49 +0100, Aaron Ford <[EMAIL PROTECTED]> wrote:
> Hey.
>
> The code that I'm trying to get to work is as follows. The problem is
> w
Hey.
The code that I'm trying to get to work is as follows. The problem is
with the 7th, 8th, and 9th lines...
Test MySQL
Error " . mysql_errno() . ": " . mysql_error() . "");
elseif (mysql_num_rows($result) == 0)
echo("Query executed successfully!");
else
{
?>
Variable_nameValue
")
On Mon, 25 Aug 2003 15:17:25 +0700
Alf Koswara <[EMAIL PROTECTED]> wrote:
> Hi,
> i read the mysql manual and it's explained the maximum table size in many
> operating system, but i can't find the maximum size for MS window (win32),
> what's the maximum table size for win32?
>
> My office want
Hi,
i read the mysql manual and it's explained the maximum table size in many
operating system, but i can't find the maximum size for MS window (win32),
what's the maximum table size for win32?
My office want to migrate the database server to mysql, and it's contains a
millions record. Can mys
David Shealy <[EMAIL PROTECTED]> wrote:
> I don't know where the error log is. I used the -l option with
> safe-mysqld and this is what I got:
>
> /usr/libexec/mysqld, Version: 3.23.56-log, started with:
> Tcp port: 3306 Unix socket: /var/lib/mysql/mysql.sock
> Time Id Command
I don't know where the error log is. I used the -l option with
safe-mysqld and this is what I got:
/usr/libexec/mysqld, Version: 3.23.56-log, started with:
Tcp port: 3306 Unix socket: /var/lib/mysql/mysql.sock
Time Id CommandArgument
On Wed, 2003-06-25 at 15:40, gerald_clark
What does the error log say?
David Shealy wrote:
I'm a newbie to MySQL. I'm trying to run it on Red Hat 9. After running
mysql_install_db, I switch to the directory where mysql.sock is located
and enter safe_mysqld &. Here's a copy of the shell output:
# safe_mysqld &
[1] 7549
# Starting mysqld d
I'm a newbie to MySQL. I'm trying to run it on Red Hat 9. After running
mysql_install_db, I switch to the directory where mysql.sock is located
and enter safe_mysqld &. Here's a copy of the shell output:
# safe_mysqld &
[1] 7549
# Starting mysqld daemon with databases from /var/lib/mysql
030626 02
Brynley wrote:
Anyhow - basically it appears he writes some Java code that contains a
MySQL query (which I'm still not sure how is done - but I think I can
nut it out) and then "calls" that piece of Java code from within the
browser (via HTML) - it is this part that has me bamboozled.
Seach f
Hi all,
I am new to MySQL and Java.
A colleague has developed a solution that utilises MySQL, Java and
HTML coding to produce a web based application and it is very cool. I
have asked him how it all slots together and he has helped me a bit
but I am still confused and he prob thinks I am too t
* Laszlo G. Szijarto
> I'm trying to run two tables with identical table structures into a single
> continuous resultset. To simpify, I have one table with columns
> ID int and
> NAME varchar(32) and another table2 with columsn ID int and NAME
> varchar(32), and each table has 100 items. How wou
Thank you in advance for your help.
I'm trying to run two tables with identical table structures into a single
continuous resultset. To simpify, I have one table with columns ID int and
NAME varchar(32) and another table2 with columsn ID int and NAME
varchar(32), and each table has 100 items. H
quot;Colin Cooler" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, June 09, 2002 6:42 PM
Subject: Re: Newbie MySQL installation problems (specific)
> Thanks Bhavin,
>
> I tried your suggestion ("safe_mysqld start") and get a lot of "Permission
>
Original Message -----
> From: "Colin Cooler" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, June 09, 2002 3:55 PM
> Subject: Newbie MySQL installation problems (specific)
>
>
>> Buying Paul DuBois' most excellent book "MySQL&qu
eate inno db tables and not myisam
tables, which is what the default binaries/rpm are configured to do (i.e.
create myisam tables, but they are non-transactional).
Regards,
Bhavin.
- Original Message -
From: "Colin Cooler" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
S
Buying Paul DuBois' most excellent book "MySQL" has made me more comfortable
with Mysql and Unix, so I thought I would try to use Mysql/PHP combo as the
web database for a redesigneed site at Right Moves For Youth (trying to keep
"at risk" kids in school).
After running his "cleanup instructions"
[snip]
I need to run an extract of some data from our Oracle DB's. One of the
restrictions is that I need to write a SQL script that will parse through a
particular field for a "/"
and if found, I have to remove it and output the data without the slash.
I have minor experience with selecting data
Hi Everyone.
I need to run an extract of some data from our Oracle DB's. One of the
restrictions is that I need to write a SQL script that will parse through a
particular field for a "/"
and if found, I have to remove it and output the data without the slash.
I have minor experience with selectin
Jeffrey,
Saturday, May 18, 2002, 5:12:15 PM, you wrote:
JC> Installed MySQL using Fink to the Mac X OS. When attempting to run, I
JC> am getting this error.
JC> ERROR 2002: Can't connect to local MySQL server through socket
JC> '/tmp/mysql.sock'
JC> Help in explaining this error and how to f
ssage -
From: "Jeffrey Camiel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 18, 2002 7:12 AM
Subject: newbie mysql install
> Installed MySQL using Fink to the Mac X OS. When attempting to run, I
> am getting this error.
>
> ERROR 2002: Can't
Installed MySQL using Fink to the Mac X OS. When attempting to run, I
am getting this error.
ERROR 2002: Can't connect to local MySQL server through socket
'/tmp/mysql.sock'
Help in explaining this error and how to fix the installation would be
appreciated.
Thanks in advance.
Jeffrey
---
On 2-04-2002 15:32, "Ulrik Witschass" <[EMAIL PROTECTED]> wrote:
> Also monitor top or the process viewer during the query. I noticed that
> without renicing, MySQLD never jumped over 10% CPU usage. So theoretically,
> I can run 10 queries at the same time and they would be as fast as running
> j
On 2-04-2002 15:28, "Ulrik Witschass" <[EMAIL PROTECTED]> wrote:
> If many other tasks are running, try to renice it (though not too much).
What does renice mean? How can I do that?
> I just ran an INNER JOIN query with a result of 21397 records in the set on
> my 867 G4 and it took around 0.5
I'm doing some benchmarks in order to understand where are the bottlenecks
in my solution and I found that a SQL query on a table with 12000 records
takes 0,87 seconds to preform (Dual 800 G4 MacOS X Server)
0,87 sec may seem fast but it is not on a solution which is going to have a
lot of traffic
9 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: Newbie MySQL Install Question
>
>
> Dan Tappin wrote:
>
> > Ok that worked... but now my SQL utility program returns a 'Host
> > 192.168.0.74 (my local IP) is not allowed to connect to this
>
ECTED]]On Behalf Of Bill Adams
> > Sent: Friday, November 09, 2001 2:26 PM
> > To: [EMAIL PROTECTED]
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: Newbie MySQL Install Question
> >
> >
> > Dan Tappin wrote:
> >
> > > I tried that but it came
gt; From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bill Adams
> Sent: Friday, November 09, 2001 2:26 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: Newbie MySQL Install Question
>
>
> Dan Tappin wrote:
>
> > I tried that but it came
Dan Tappin writes:
> I tried that but it came back with a 'mysqld is running already' error.
/me silently curses the bad quoting habits that Lookout causes, but
knows what the thread was about, and so _please disregard_ this
sentence unless you know what I'm talking about.
Now where was I? Oh,
DOH! :^)
Thanks for the tips.
Dan
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bill Adams
> Sent: Friday, November 09, 2001 2:26 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: Newbie MySQL Install Question
I'm getting the sazme exact error, can anyone help us??
-Original Message-
From: Kelley Reynolds [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 09, 2001 4:07 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Newbie MySQL Install Question
Make sure that the mysql serve
Dan Tappin wrote:
> I tried that but it came back with a 'mysqld is running already' error.
Actually your command is wrong. If you never set the password before it should
be (without the -p):
mysqladmin -u root password your?new.password
note that 'password' IS the command.
> Side Question:
Port 3306 is open on the machine.
Dan
> -Original Message-
> From: Kelley Reynolds [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 09, 2001 2:07 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: Newbie MySQL Install Question
>
>
> Make sure t
aptop but I get
a secure connection refused message.
Thanks,
Dan
> -Original Message-
> From: Kelley Reynolds [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 09, 2001 2:07 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: Newbie MySQL Install Question
>
ptop but I get
a secure connection refused message.
Thanks,
Dan
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bill Adams
> Sent: Friday, November 09, 2001 2:10 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: N
Dan Tappin wrote:
> I have some experience with MySQL on MacOS X but that was with a pretty GUI
> installer.
>
> I am now trying to get MySQL installed on Redhat 7.0. I download the client
> and server versions and followed the install procedures.
>
> The problem I am having is with mysqladmin.
Make sure that the mysql server has been started.
- Original Message -
From: "Dan Tappin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 09, 2001 4:07 PM
Subject: Newbie MySQL Install Question
> I have some experience with MySQL on MacOS X b
I have some experience with MySQL on MacOS X but that was with a pretty GUI
installer.
I am now trying to get MySQL installed on Redhat 7.0. I download the client
and server versions and followed the install procedures.
The problem I am having is with mysqladmin. The docs state that you need t
52 matches
Mail list logo