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'

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

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.

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

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

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

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

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
Thanks Bhavin, I tried your suggestion ("safe_mysqld start") and get a lot of "Permission denied" errors. So, I "su" to root and try it, and it appears that it does start ("Starting mysqld daemon with databases from /usr/local/mysql/data"). However, when I try to connect, either as root (which

Re: Newbie MySQL installation problems (specific)

2002-06-09 Thread Bhavin Vyas
Have you tried .../bin/safe_mysqld start to start the DB first? This is what will create /tmp/mysql.sock socket file & start the DB server. Then you can use the 'mysql' client for connecting to the DB. Also, if you don't want to use transactional database, meaning, if you don't want support for ro

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

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\)
Just a guess, could it be that the Mac does not support sockets...?? I dunno, I'm just fishing since I have not yet had an opportunity to play with the OS X. What about permissions? non-the-less... Try changing your config file to use TCP and see if that works. The other thing I ran into wh

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

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 but that was with a pretty