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, but a PHP question I'

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

Newbie mysql windows-linux prob

2005-06-27 Thread Prashanth H. Baragur
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

Re: Newbie: MYSQL nested query question

2005-04-05 Thread SGreen
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

Re: Newbie: MYSQL nested query question

2005-04-01 Thread Graham Anderson
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

Re: Newbie: MYSQL nested query question

2005-04-01 Thread Graham Anderson
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

Re: Newbie: MYSQL nested query question

2005-04-01 Thread Peter Brawley
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

Re: Newbie: MYSQL nested query question

2005-04-01 Thread Graham Anderson
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

Re: Newbie: MYSQL nested query question

2005-03-31 Thread Philip M. Gollucci
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

Newbie: MYSQL nested query question

2005-03-31 Thread Graham Anderson
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

Re: Newbie: mysql syntax error question

2005-03-20 Thread Michael Stassen
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.

Newbie: mysql syntax error question

2005-03-19 Thread Graham Anderson
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.

Newbie: MySQL cluster configuration

2004-12-20 Thread Hiu Yen Onn
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

Re: Newbie, MySQL test fails, spent hours, please help

2004-12-06 Thread Eric Bergen
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

Newbie, MySQL test fails, spent hours, please help

2004-12-06 Thread Aaron Ford
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 ")

Re: newbie > mysql table size?

2003-08-25 Thread Antony Dovgal
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

newbie > mysql table size?

2003-08-25 Thread Alf Koswara
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

Re: MySQL Newbie: MySQL stops as soon as it starts

2003-06-26 Thread Egor Egorov
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

Re: MySQL Newbie: MySQL stops as soon as it starts

2003-06-25 Thread David Shealy
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

Re: MySQL Newbie: MySQL stops as soon as it starts

2003-06-25 Thread 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

MySQL Newbie: MySQL stops as soon as it starts

2003-06-25 Thread David Shealy
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

Re: Newbie: MySQL + Java + web?

2003-01-03 Thread Max Morawski
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

Newbie: MySQL + Java + web?

2003-01-02 Thread Brynley
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

Re: newbie mysql-SQL question

2002-07-06 Thread Roger Baklund
* 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

newbie mysql-SQL question

2002-07-06 Thread Laszlo G. Szijarto
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

Re: Newbie MySQL installation problems (specific)

2002-06-09 Thread Bhavin Vyas
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 >

Re: Newbie MySQL installation problems (specific)

2002-06-09 Thread Colin Cooler
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

Re: Newbie MySQL installation problems (specific)

2002-06-09 Thread Bhavin Vyas
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

Newbie MySQL installation problems (specific)

2002-06-09 Thread Colin Cooler
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"

RE: Newbie MySql

2002-06-06 Thread Jay Blanchard
[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

Newbie MySql

2002-06-06 Thread Memon, Michele
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

Re: newbie mysql install

2002-05-20 Thread Egor Egorov
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

Re: newbie mysql install

2002-05-19 Thread Erik Perrhoe \(Computer Consultant\)
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

newbie mysql install

2002-05-18 Thread Jeffrey Camiel
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 ---

Re: Newbie: MySQL poor performance

2002-04-02 Thread Augusto Pirovano
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

Re: Newbie: MySQL poor performance

2002-04-02 Thread Augusto Pirovano
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

Newbie: MySQL poor performance

2002-04-02 Thread Augusto Pirovano
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

RE: Newbie MySQL Install Question

2001-11-09 Thread Dan Tappin
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 >

Re: Newbie MySQL Install Question

2001-11-09 Thread Bill Adams
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

RE: Newbie MySQL Install Question

2001-11-09 Thread Dan Tappin
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

Re: Newbie MySQL Install Question

2001-11-09 Thread Carl Troein
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,

RE: Newbie MySQL Install Question

2001-11-09 Thread Dan Tappin
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

RE: Newbie MySQL Install Question

2001-11-09 Thread Wells, Kenneth L
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

Re: Newbie MySQL Install Question

2001-11-09 Thread Bill Adams
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:

RE: Newbie MySQL Install Question

2001-11-09 Thread Dan Tappin
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

RE: Newbie MySQL Install Question

2001-11-09 Thread Dan Tappin
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 >

RE: Newbie MySQL Install Question

2001-11-09 Thread Dan Tappin
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

Re: Newbie MySQL Install Question

2001-11-09 Thread Bill Adams
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.

Re: Newbie MySQL Install Question

2001-11-09 Thread Kelley Reynolds
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

Newbie MySQL Install Question

2001-11-09 Thread Dan Tappin
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