MySQL Install on OS X Leoperd

2007-10-26 Thread Craig Hoffman

Hi There,
Has anyone been successful installing and running MySQL (current  
version) on the new Mac OS (Leopard)?

__
Craig Hoffman
iChat/AIM: m0untaind0g
__



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL Install on OS X Leoperd

2007-10-26 Thread Craig Hoffman

This worked --
To fix the mySQL socket error, start mysql in terminal by doing this...

sudo /usr/local/mysql/bin/safe_mysqld

close Terminal, then open it again and put in these two...

sudo mkdir /var/mysql/

sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
Restart Apache
Should work until they fix the pref pane.
__
Craig Hoffman
iChat/AIM: m0untaind0g
__


On Oct 26, 2007, at 3:59 PM, Craig Hoffman wrote:


Hi There,
Has anyone been successful installing and running MySQL (current  
version) on the new Mac OS (Leopard)?

__
Craig Hoffman
iChat/AIM: m0untaind0g
__



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql? 
[EMAIL PROTECTED]





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



converting access (.mdb) files...

2005-09-15 Thread Craig Hoffman
Anyone know a way to convert MS Access DB files (.mdb) into a format  
MySQL can import?  I'm on a Mac hence I don't have Access.


Best,
CH
___
Craig Hoffman
www.eclimb.net

[EMAIL PROTECTED]
iChat / AIM: m0untaind0g
___




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Error - #1251

2005-01-18 Thread Craig Hoffman
Thanks - I got it working.
On Jan 18, 2005, at 12:35 AM, Mattias J wrote:
At 2005-01-18 04:53, Craig Hoffman wrote:
I upgrade to 4.1.9 last night and I keep getting this error in 
PhpMyAdmin after I changed the root password (yes I changed both 
pw's).  Does anyone have a solution on how to fix this?  I'm running 
a Mac 10.3.x

#1251 - Client does not support authentication protocol requested by 
server; consider upgrading MySQL client
If you try searching for 1251 authentication on mysql.com, the first 
hit is this page, which will provide the answer
http://dev.mysql.com/doc/mysql/en/Old_client.html

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Like statement help

2005-01-18 Thread Craig Hoffman
Hi There,
I have web form where a user can search certain fields and then have 
them displayed aggregated.  For example, find all the routes I climbed 
with partner A in area(s) ALL (% - wildcard) between date1 and date2 -- 
so on.  See below for the complete query.

I'm using pull down menu's and when a the user does not select 
something the default is ALL or  option value='%' ALL /option  for 
all.  Then all the other options are listed.   Should I be using the 
% as a wildcard?  I would like it to work if one, two, three... or all 
fields are selected.  Obviously, the more options you select the more 
detailed your search becomes and vice versa.  Any thoughts on what 
could be wrong with my query?  Any help would be appreciated.

Thanks - Craig
Here is my query
query = SELECT routes.*, users.email, users.fname, users.lname, 
users.user_id, ranking.* FROM routes, users, ranking WHERE 
email='$email'			AND area LIKE '%$area%'
			AND partner LIKE '%$partner%'
			AND id BETWEEN '$rating1' AND '$rating2'
			AND additional_rating IS NOT NULL LIKE '%$additional_rating%'
			AND pitchs LIKE '%$pitchs%'
			AND `type` LIKE '%$type%'
			AND style LIKE '%$style%'
			AND stars LIKE '%$stars%'
			AND fall  LIKE '%$fall%'
			AND popular LIKE '%$popular%'
			AND date_climbed BETWEEN '$date_climbed1' AND '$date_climbed2'
			AND routes.rating = ranking.rating
			AND routes.user_id = users.user_id
			GROUP BY route_count ORDER BY area, date_climbed DESC;	

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Error - #1251

2005-01-17 Thread Craig Hoffman
I upgrade to 4.1.9 last night and I keep getting this error in 
PhpMyAdmin after I changed the root password (yes I changed both pw's). 
 Does anyone have a solution on how to fix this?  I'm running a Mac 
10.3.x

#1251 - Client does not support authentication protocol requested by 
server; consider upgrading MySQL client 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: AVG Function

2004-08-25 Thread Craig Hoffman
Mark,
Yes its close and thank you.  The problem I am having is I am able to 
generate the correct ranking.id  for that particular user but I can't 
seem to make it equal the ranking.rating.

ID   ranking.rating
9   =  5.6 (example)
Here's my query:
SELECT routes.user_id, ranking.rating, ROUND(AVG(ranking.id), 0) 
avg_ranking, users.username, users.user_id, routes.rating FROM ranking, 
routes, users WHERE username='$username'  AND routes.user_id = 
users.user_id AND ranking.rating = routes.rating GROUP BY 
routes.user_id

//echo some stuff out
echo(td  align='right'.$row[ranking.rating]. /td);
I know I need to make the avg_ranking or the ranking.id = 
ranking.rating but I can't seem to get it work.  Any more suggestions?  
Again thanks for all your help.

-- Craig
On Aug 25, 2004, at 12:48 AM, Mark C. Stafford wrote:
Hi Craig,
It sounds to me as though you're practically there. My syntax is a
little different when I do groupings. Here's what I got from your
question. Is it what you wanted...or close enough to get you where
you're going?
Good luck,
Mark
drop table if exists test.ranking;
create table test.ranking (
  id int(3) unsigned auto_increment primary key
, rating varchar(5)
);
insert into test.ranking(rating) values('5.0');
insert into test.ranking(rating) values('5.1');
insert into test.ranking(rating) values('5.2');
insert into test.ranking(rating) values('5.3');
insert into test.ranking(rating) values('5.3a');
insert into test.ranking(rating) values('5.3b');
drop table if exists test.routes;
create table test.routes (
  user_id int(3) unsigned
, rating varchar(5)
);
insert into test.routes(user_id, rating) values(1, '5.2');
insert into test.routes(user_id, rating) values(1, '5.3');
insert into test.routes(user_id, rating) values(1, '5.3a');
SELECT routes.user_id
, @avg:=ROUND(AVG(ranking.id), 0) avg_ranking
FROM test.ranking
, test.routes
WHERE routes.user_id = 1
AND ranking.rating = routes.rating
GROUP BY routes.user_id
;
SELECT *
FROM test.ranking
WHERE id = @avg
;
+++
| id | rating |
+++
|  4 | 5.3|
+++

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


AVG Function

2004-08-24 Thread Craig Hoffman
Hey Everyone,
I can you some assistance on this query.
I have three tables one is called ranking and the other is called 
routes and finally the users table. The users table is not really 
important.
The ranking table looks like this:

id  rating
1   5.0
2   5.1
3   5.2
4   5.3
5   5.3a
6   5.3b
and so on...
The routes table looks like this:
user_id route   rating
1   somename5.2
1   5.3 
1   5.3a
Here's my query:
SELECT ranking.rating, AVG(id), users.username, users.user_id, 
routes.rating, routes.user_id FROM ranking, routes, users WHERE 
username='$username' AND users.user_id = routes.user_id AND 
ranking.rating = routes.rating GROUP BY username

What I am trying to do is find the average rating for this user.  For 
example:

5.2 = 3
5.3 = 4
5.3a = 5
___
3 + 4 + 5 = 12 / 3 = 4
So 4 = 5.3
The average for this user would be 5.3.  Any help would be most 
appreciated.
Craig

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


ORDER BY rand()

2004-08-19 Thread Craig Hoffman
Hey Folks,
I have a query where it pulls random data and display's it.
SELECT route_photo, route, route_count, area FROM routes WHERE  
ORDER BY RAND() LIMIT 1

The query works fine, however, the route_photo field is partially 
populated. This results in just a route name appearing but no photo. 
How can I change the query to only pull up routes that have a 
route_photo listed in the DB?

Thanks,
CH
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Between Operator

2004-07-09 Thread Craig Hoffman
Hey Everyone,
I have query where one selects an style then a area and finally 
rating.  When some selects a rating they select a range of ratings.  
For example:

Style:  Traditional
Area:  Yosemite
Rating: From: 5.5 To: 5.10c
This should pull up all the rock climbs that are in Yosemite, that are 
traditional style and are between the rating 5.5 to 5.10c.  Here is my 
query:

SELECT * FROM routes, users WHERE area='$area' AND style='$style'  
BETWEEN rating='[$rating1]' AND rating='[$rating2]' GROUP BY route 
ORDER BY rating ASC ;

 For some reason which I am not seeing, this query is not doing what it 
should be doing.  Does anyone have any suggestions?

Thanks, Craig
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Between Operator

2004-07-09 Thread Craig Hoffman
Thanks everyone for helping out.I took Michael's advice and made a 
new  table called ranking and two columns. It defiantly cleared some 
things up  but I am still having issues using the BETWEEN operator.  I 
just need to pull up everything BETWEEEN 10 and 18 and it keeps adding 
additional rows. Suggestions?  What am I doing wrong?

Here is my query:
SELECT area, style, route, stars, date_climbed, ranking.* FROM routes, 
ranking WHERE ranking.id = ranking.rating BETWEEN ranking.id  '10' AND 
ranking.id = '18' AND routes.rating = ranking.rating AND area = 
'Eldorado Canyon' AND style = 'Traditonal' GROUP BY route ORDER BY id 
DESC

Thanks,
Craig


On Jul 9, 2004, at 1:17 PM, Pete Harlan wrote:
On Fri, Jul 09, 2004 at 09:39:02AM -0500, Craig Hoffman wrote:
Style:  Traditional
Area:  Yosemite
Rating: From: 5.5 To: 5.10c
...
SELECT * FROM routes, users WHERE area='$area' AND style='$style'
BETWEEN rating='[$rating1]' AND rating='[$rating2]' GROUP BY route
ORDER BY rating ASC ;
 For some reason which I am not seeing, this query is not doing what 
it
should be doing.  Does anyone have any suggestions?
For starters your between syntax isn't correct (but is parsable in
ways you didn't want).  You probably want:
select  *
fromroutes, users
where   area = '$area'  and
style = '$style'and
rating between '$rating1' and '$rating2'
group by route
order by rating
As others have pointed out, your ratings aren't something MySQL will
know how to order.  That's a separate problem (and more difficult to
solve), but the between syntax is also one.
--Pete
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Long numbers

2004-04-11 Thread Craig Hoffman
Hi There:
I have a query where I get an average of weekly miles.
For example:
Average Weekly Miles:
3.4285714285714
How would I get this number into a more read format?  Such as 3.42. I 
have tried the truncate but I can't seem to get it to work.  Does any 
one have any suggestions?

SELECT TURNCATE(AVG(distance)), rest of the query 

Thanks - CH
__
Craig Hoffman - eClimb Media
v: (847) 644 - 8914
f: (847) 866 - 1946
e: [EMAIL PROTECTED]
w: www.eclimb.net
_
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Long numbers

2004-04-11 Thread Craig Hoffman
that worked - Thanks a bunch!

CH
__
Craig Hoffman - eClimb Media
v: (847) 644 - 8914
f: (847) 866 - 1946
e: [EMAIL PROTECTED]
w: www.eclimb.net
_
On Apr 11, 2004, at 3:14 PM, Mike Blezien wrote:
I think your looking for the ROUND(N,D) function, IE:

select round('3.4285714285714',2) as miles;

3.43 miles

MikemickaloBlezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Quality Web Hosting
http://www.justlightening.net
MSN: [EMAIL PROTECTED]
1.985.320.1191
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Craig Hoffman wrote:
Hi There:
I have a query where I get an average of weekly miles.
For example:
Average Weekly Miles:
3.4285714285714
How would I get this number into a more read format?  Such as 3.42. I 
have tried the truncate but I can't seem to get it to work.  Does any 
one have any suggestions?
SELECT TURNCATE(AVG(distance)), rest of the query 
Thanks - CH
__
Craig Hoffman - eClimb Media
v: (847) 644 - 8914
f: (847) 866 - 1946
e: [EMAIL PROTECTED]
w: www.eclimb.net
_


--

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Truncating long numbers

2004-04-02 Thread Craig Hoffman
Hi there,
I have this query (see below)
SELECT SUM(distance + date), DATE_FORMAT(time_upload, '%M') FROM 
traininglog_client, users WHERE username='$username' AND 
DATE_SUB(CURDATE(),INTERVAL 1 MONTH) = time_upload AND users.user_id = 
traininglog_client.user_id GROUP BY username

and it returns this:   (see below)

SUM( distance + date )  DATE_FORMAT( time_upload, '%M' )
140282467.4 March
How can I make the 140282467.4 into a more readable number?  Such as 
14.54.

My distance field in MySQL is a double, if that helps.

__
Craig Hoffman - eClimb Media
v: (847) 644 - 8914
f: (847) 866 - 1946
e: [EMAIL PROTECTED]
w: www.eclimb.net
_
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Truncating long numbers

2004-04-02 Thread Craig Hoffman
Yes your right - I thought the numbers in the DB were something else.
__
Craig Hoffman - eClimb Media
v: (847) 644 - 8914
f: (847) 866 - 1946
e: [EMAIL PROTECTED]
w: www.eclimb.net
_
On Apr 2, 2004, at 11:11 AM, Paul DuBois wrote:
At 10:44 -0600 4/2/04, Craig Hoffman wrote:
Hi there,
I have this query (see below)
SELECT SUM(distance + date), DATE_FORMAT(time_upload, '%M') FROM 
traininglog_client, users WHERE username='$username' AND 
DATE_SUB(CURDATE(),INTERVAL 1 MONTH) = time_upload AND users.user_id 
= traininglog_client.user_id GROUP BY username

and it returns this:   (see below)

SUM( distance + date )  DATE_FORMAT( time_upload, '%M' )
140282467.4 March
How can I make the 140282467.4 into a more readable number?  Such 
as 14.54.


Huh?  How can 140282467.4 become 14.54?

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
MySQL Users Conference: April 14-16, 2004
http://www.mysql.com/uc2004/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]