Re: NOW() is stuck...

2013-06-26 Thread John Meyer
Well, if you want to get unstuck in time, maybe you need to call Billy 
Pilgrim ;-)

Andy Wallace wrote:
We've been having some issues with one of our MySQL servers lately, 
and currently
the dang thing is "stuck". For at least the last hour, NOW() is 
returning the same

value:

mysql> select now();
+-+
| now()   |
+-+
| 2013-06-26 02:27:14 |
+-+

The system variable "timestamp" also has that same time value stored 
in it. How
can we kick this loose so that the values are more current with real 
time? (it is
currently 3:08PM here, despite our MySQL instance thinking it's 2am. 
The system

time on the machine is correct:

$ date
Wed Jun 26 15:08:56 PDT 2013


This is MySQL 5.1.46 running on solaris2.10.

Any ideas short of restarting the MySQL engine? I'm willing to do 
that, but would much

rather wait and not do it in the middle of the day.

Thanks,
Andy





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



Re: how to view all acounts in a database

2010-02-05 Thread John Meyer

On 2/5/2010 5:15 AM, Suresh Kuna wrote:

In the mysql prompt, execute the below

use mysql ; select user from user ;

will show all the accounts in a MySQL database.




Alternatively, you can use myphpadmin.  I guess it all depends upon what 
you need the information for and to what purpose.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Good source for sample data?

2010-01-28 Thread John Meyer

If I may recommend:
http://www.generatedata.com/#download


On 1/28/2010 8:11 PM, Carlos Proal wrote:


Google for "data generator", there are free and commercial solutions
available.

Carlos

On 1/28/2010 5:52 PM, Brian Dunning wrote:

Hey all -

I need a few million sample contact records - name, company, address,
email, web, phone, fax. ZIP codes and area codes and street addresses
should be correct and properly formatted, but preferably not real
people or companies or email addresses. But they'd work if you did
address validation or mapping. Anyone have a suggestion?

- Brian






--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Good source for sample data?

2010-01-28 Thread John Meyer

On 1/28/2010 4:52 PM, Brian Dunning wrote:

Hey all -

I need a few million sample contact records - name, company, address, email, 
web, phone, fax. ZIP codes and area codes and street addresses should be 
correct and properly formatted, but preferably not real people or companies or 
email addresses. But they'd work if you did address validation or mapping. 
Anyone have a suggestion?

- Brian


You can typically rip off a list of baby names online and can randomize 
them on the name address and company. e-mail, web, phone, fax and zip 
codes can be randomized, depending upon how accurate you need it to be. 
 Given a few hours you could write up a script in your language of 
choice to get these records.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: 50 things to know before migrating from Oracle to MySQL

2010-01-28 Thread John Meyer

On 1/28/2010 3:21 AM, changuno wrote:

Hi folks,

Read a blog which states 50 things to know before migrating from Oracle to 
MySQL. Any comments on this?


would it have been too much to just link to it?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Record old passwords ?

2010-01-21 Thread John Meyer

On 1/19/2010 7:49 AM, Mark Goodge wrote:

On 19/01/2010 14:44, Tompkins Neil wrote:

Hi All,

Following on from my earlier email - I've the following question now :

I can enforce that the user can't use the same password as the
previous four
- when they change their password. However, the user can manipulate
this by
changing the password four times and then resetting back to there
original
password. How would I overcome this problem ? Any thoughts or
recommendations ?


Store the date/time that the password was changed, and as well as not
alllowing one within the past four passwords you can also disallow one
that was last used within the past N days, for whatever value of N you
prefer.

Mark




Keep in mind that if you do this you may be setting yourself up for 
other security risks (people writing down passwords, etc).  If a 
security measure gets in the way of the right people's ability to access 
the environment, they will find a way to circumvent it--and screw over 
your pci compliance in the process.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Record old passwords ?

2010-01-18 Thread John Meyer

On 1/18/2010 5:52 PM, Colin Streicher wrote:

On January 18, 2010 01:34:15 pm Tompkins Neil wrote:

Hi

I'm in the process of designing a login system to a secure web page using
MySQL.  One of the features is we need to record and ensure that the user
password is different from any of the last four passwords he/she has used.
  I was thinking of create four fields called Password1, Password2,
  Password3 and Password4 to record the old passwords.

Is this a preferred method - or does anyone else have any recommendations ?

Thanks,
Neil


I'm not an awesome database designer, most of what I do is code related stuff,
I think what I would do for this is 1. hash the password( sha256/512 whatever)
and then 2. store the hash in a string with delimiters. In that way, you solve
2 problems.
You can store as many as you want to because you can just check hashes to make
sure it isn't the same, and second, you aren't storing passwords in plain-
text, which is a personal pet peeve.




Almost always, when you start thinking of fields with numbers at the end 
of their names, you should move that off to another table.  Example:



PASSWORD_HISTORY
PW_ID
USER_ID  <--foreign key linking to the user table
PW_ENTRY
PW_ENTRYDATE


That way all you have to do is write this query:

SELECT * FROM PASSWORD_HISTORY WHERE USER_ID='entry' ORDER BY 
PW_ENTRYDATE DESC LIMIT 4;



Although, on an OT, forcing people to not use a password that they have 
recently used is a bad idea.  What they eventually do is go with 
something like "hometown01" "hometown02", etc.  Or worse, they start 
writing down their passwords which is a whole other security problem.






--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: Finding users who haven't posted in a week

2009-11-08 Thread John Meyer
Now I'm wondering if I can use this query in an update to set a variable in
a second table

Users
--
User_id VARCHAR(50)
. . .
User_active BITINT(1)

I want to set user_active to 0 where the user_id is in the query below.

select user_id, max(tweet_createdat) from tweets group by user_id having
datediff(now(),max(tweet_createdat)) > 7;


-Original Message-
From: John Meyer [mailto:johnme...@pueblocomputing.com] 
Sent: Sunday, November 08, 2009 9:45 AM
To: 'Michael Dykman'
Cc: mysql@lists.mysql.com
Subject: RE: Finding users who haven't posted in a week

Thanks, morning coffee hasn't kicked in.  This worked out well.

select user_id, max(tweet_createdat) from tweets group by user_id having
datediff(now(),max(tweet_createdat)) > 7;

I forgot when to use the where and when to use the having clause.

-Original Message-
From: Michael Dykman [mailto:mdyk...@gmail.com] 
Sent: Sunday, November 08, 2009 8:35 AM
To: John Meyer
Cc: mysql@lists.mysql.com
Subject: Re: Finding users who haven't posted in a week

the function max(), among others, makes no sense in the absence of a
GROUP BY clause.

try adding "GROUP BY user_id"

 - michael dykman

On Sun, Nov 8, 2009 at 9:40 AM, John Meyer
 wrote:
> I want to get a list of all users who haven't posted in a week. But when I
> use the following function.
>
>
>
> select user_id, max(tweet_createdat) from tweets where
> datediff(now(),max(tweet_createdat)) > 7;
>
>
>
>
>
> Is producing the error:
>
>
>
> Invalid use of group function
>
>
>
>
>
>



-- 
 - michael dykman
 - mdyk...@gmail.com

"May you live every day of your life."
Jonathan Swift

Larry's First Law of Language Redesign: Everyone wants the colon.
No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.425 / Virus Database: 270.14.52/2484 - Release Date: 11/08/09
07:37:00


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=john.l.me...@gmail.com

No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.425 / Virus Database: 270.14.52/2484 - Release Date: 11/08/09
07:37:00


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: Finding users who haven't posted in a week

2009-11-08 Thread John Meyer
Thanks, morning coffee hasn't kicked in.  This worked out well.

select user_id, max(tweet_createdat) from tweets group by user_id having
datediff(now(),max(tweet_createdat)) > 7;

I forgot when to use the where and when to use the having clause.

-Original Message-
From: Michael Dykman [mailto:mdyk...@gmail.com] 
Sent: Sunday, November 08, 2009 8:35 AM
To: John Meyer
Cc: mysql@lists.mysql.com
Subject: Re: Finding users who haven't posted in a week

the function max(), among others, makes no sense in the absence of a
GROUP BY clause.

try adding "GROUP BY user_id"

 - michael dykman

On Sun, Nov 8, 2009 at 9:40 AM, John Meyer
 wrote:
> I want to get a list of all users who haven't posted in a week. But when I
> use the following function.
>
>
>
> select user_id, max(tweet_createdat) from tweets where
> datediff(now(),max(tweet_createdat)) > 7;
>
>
>
>
>
> Is producing the error:
>
>
>
> Invalid use of group function
>
>
>
>
>
>



-- 
 - michael dykman
 - mdyk...@gmail.com

"May you live every day of your life."
Jonathan Swift

Larry's First Law of Language Redesign: Everyone wants the colon.
No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.425 / Virus Database: 270.14.52/2484 - Release Date: 11/08/09
07:37:00


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Finding users who haven't posted in a week

2009-11-08 Thread John Meyer
I want to get a list of all users who haven't posted in a week. But when I
use the following function.

 

select user_id, max(tweet_createdat) from tweets where
datediff(now(),max(tweet_createdat)) > 7;

 

 

Is producing the error:

 

Invalid use of group function

 

 



Re: Questions on Database Design

2009-10-03 Thread John Meyer

Mark Phillips wrote:

On Sat, Oct 3, 2009 at 3:06 PM, Martin Gainty  wrote:

  

 depends on the relationship of the Data Tables and the Users that use them

for instance if I was to setup a table of outgoing calls from 2 distinct
individuals :
Me>  calls to HarvardMedicalSchool, MassGeneral,
SomervilleHospital and AMA
VereinDesKrankRufs>calls to Biff,Tony,EdSoprano and Destiny

so as you can see the difference between my calls and Vereins calls should
never be joined
as Vereins customers are distinctly not mine and mine are not his
Moreover my contact table would contain Degrees and titles where Vereins
customers
have no need for that
So in this case it would make perfect sense for my Database to be separate
and distinct from Vereins database..if for no other reason than the schemas
are completely difference

With an emphasis on security once Verein initiates populating his records
on your DB by populating the same tables and using the same join
relationships it will be impossible to force him to not use those tables
or even to restrich his access to the slave server while you're updating
the master
You can restrict access by GRANT SELECT on the tables to Verein but that
would last only a week or 2 until Verein requests update and insert access
to the DB. Once the INSERT and UPDATE grants are made you wont be able to
separate his records from yours

Keep the 2 separate is my suggestion..MySQL is inexpensive and HW is cheap
so this should be a low cost solution for you

Keep us apprised and any feel free to inquire on any operational details
you may require.

Thanks! To make sure I understand. Even if the schemas are the same, if the


data is not related, nor is meant to be combined in some way (eg rolled up
or summed in some way), then creating a separate database for each user is a
better way to go; or at least a meaningful way to go. A side benefit is
greater security from the stand point that user a cannot get to user b's
data.

Can't I achieve the same level of security if each row has a userID, and all
queries use a "where userID=xxx" clause?

Mark
  




no, don't confuse that with database security.  There are too many ways 
to get around that sort of trick through SQL injection attacks. Read 
http://dev.mysql.com/doc/refman/5.4/en/privilege-system.html for a 
starter on privileges and security.
But as long as you're not needing to regularly combine and aggregate the 
data then creating separate databases is a reasonable option.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Questions on Database Design

2009-10-03 Thread John Meyer



John,
Thanks. The data is private to each user; there is no sharing of data. 
I am not sure what you mean by "are the actions related" Each user is 
reading/writing independently of each other. Would that argue for 
separate databases?
 
Mark



Are the actions of a similar nature (i.e. they're all writing the same 
type of data and the databases themselves would be similar if not the 
same)?  Is there any sort of application that would traverse all of 
those databases at once?
Also keep in mind that multiple databases increases your complexity.  I 
think we'd have a better idea if we knew a little more of the specifics 
of this application.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Questions on Database Design

2009-10-03 Thread John Meyer

Mark Phillips wrote:

I am new at database design, and my question relates to the trade-offs
between putting all data in one database or several for mysql. For example,
say I have an application where a users login from their mobile phones and
read/write data to a database. Say there are roughly 10-15 tables in the
database and each user will add approximately 20,000 records per year. Each
user should not have access to data from another user. Users have to
register in some way to create their database in the first place. When does
it make sense to give each user their own database versus putting all the
data into one database (ie one set of tables) and with multiple userIDs? 10
users? 1,000 users? Never?
  




It's not so much how many users you have (though that may be a question 
of data storage more than databases) as to what are they doing?  Are the 
actions related?  If they are, then have one database with each user 
having access to their records and their records only, which can easily 
be done with terms of database security..


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: What should it be in MySql? In C, it's an array of integers.

2009-09-17 Thread John Meyer

Johan De Meersman wrote:

On Thu, Sep 17, 2009 at 3:46 AM, John Meyer  wrote:
  

Alternatively, you can skip the A_ID and have a compound key of USER_ID and
A_NUMBER on the ASSOC_NUMBERS table. I prefer the A_ID, though.



Note that this would be marginally faster, because all your data is in
the index, so you don't need to do an additional lookup into the data
segment of your table.

  


And assuming that the numbers don't duplicate in your array.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: What should it be in MySql? In C, it's an array of integers.

2009-09-16 Thread John Meyer

Pete Wilson wrote:

Break them out into a separate table linked via the primary
key.



How elegant! Thanks.

-- Pete

  



it's nothing not taught in Database Design 101.  Typically you would 
have a setup like this


USERS
USER_ID <--primary key
USER_NAME
USER_IP

ASSOC_NUMBERS
A_ID  <--primary key
USER_ID <-- foreign key linked to users
A_NUMBER <---one of the integers that you would store

Alternatively, you can skip the A_ID and have a compound key of USER_ID 
and A_NUMBER on the ASSOC_NUMBERS table. I prefer the A_ID, though.  
Another way I've read about (though I can't remember the article) is 
that certain types of databases do allow you to store an array.  These 
are normally used for databases that need to be very, very small (like 
on an embedded chip).  However, the way I described is usually the 
default for relational databases.




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: What should it be in MySql? In C, it's an array of integers.

2009-09-16 Thread John Meyer

Pete Wilson wrote:

Hi folks --

What would be the right approach in MySql 5.0?

My table, USERS, has columns NAME and IP. Associated with each user is also a 
collection of from 0 to 50 INTs. What's a reasonable way to put these 50 INTs 
in the table without using 50 separate columns, INT01...INT50? Is BLOB an OK 
approach?

I have to manipulate these INTs in my CGI code.

Thanks!

-- Pete
  



Break them out into a separate table linked via the primary key.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Datediff function

2009-09-16 Thread John Meyer

Gavin Towey wrote:

Hi John,

You can't use aggregate function in the WHERE clause, because they aren't 
evaluated until after the WHERE clause is applied.

Wouldn't it be much easier to simply keep a last_tweet_date field updated 
somewhere then simply do
SELECT USER_NAME FROM USERS WHERE last_tweet_date < NOW()-INTERVAL 7 DAY; ?

Regards,
Gavin Towey
  



I don't know if that would be so simple. I'd have to run programming 
logic when I fetch the information off the twitter server. I just hoped 
that there was a way to do it through SQL.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Datediff function

2009-09-16 Thread John Meyer
I'm trying to pull up a list of users who haven't tweeted in 7 or more 
days, and I'm trying to use this statement:
SELECT USER_NAME, MAX(TWEET_CREATEDAT) FROM USERS NATURAL JOIN TWEETS 
WHERE DATEDIFF(NOW(),MAX(TWEET_CREATEDAT)) > 7 GROUP BY USERS.USER_ID


But it says "invalid group function".  How should I reword this query?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Right Date format mask

2009-09-14 Thread John Meyer

Dan Nelson wrote:

In the last episode (Sep 14), John Meyer said:
  

I'm pulling in a date with the following format
9/14/2009 2:12:48 PM
And using this mask to convert it using the str_to_date() function:
%e %m %Y %r

but it keeps giving me an error.  Do I have the right mask?



Nope.  Assuming your input string is in mm/dd/yyy format, you would want a
format string of "%m/%e/%Y %r".

  


To quote the great sage and eminent drunkie Homer Simpson "Doh!"

Thanks.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Right Date format mask

2009-09-14 Thread John Meyer

I'm pulling in a date with the following format
9/14/2009 2:12:48 PM
And using this mask to convert it using the str_to_date() function:
%e %m %Y %r

but it keeps giving me an error.  Do I have the right mask?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Natural join problem

2009-09-10 Thread John Meyer

Thanks.  That worked.

Jason Trebilcock wrote:

Methinx you need a "GROUP BY" in there.  See below.

  

-Original Message-----
From: John Meyer [mailto:john.l.me...@gmail.com]
Sent: Thursday, September 10, 2009 6:48 PM
To: mysql@lists.mysql.com
Subject: Natural join problem

Two tables:

USERS:
USER_ID (PK)
. . .etc

TWEETS:
TWEET_ID (PK)
USER_ID (FK)

Trying to get the user information and the number of tweets each person
has:

SELECT USERS.USER_NAME, COUNT(TWEETS.TWEET_ID) AS 'TWEETCOUNT' FROM
TWEETS NATURAL JOIN USERS;




select u.user_name, count(t.tweet_id)
from users u, tweets t
where u.user_id = t.user_id
group by u.user_name


  



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Natural join problem

2009-09-10 Thread John Meyer

Two tables:

USERS:
USER_ID (PK)
. . .etc

TWEETS:
TWEET_ID (PK)
USER_ID (FK)

Trying to get the user information and the number of tweets each person has:

SELECT USERS.USER_NAME, COUNT(TWEETS.TWEET_ID) AS 'TWEETCOUNT' FROM 
TWEETS NATURAL JOIN USERS;


But it seems to be just rolling up all the information into one row.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Database design - help

2009-08-31 Thread John Meyer

BobSharp wrote:

As a complete newbie in MySQL,  I need a database
to store URLs related to Tenpin Bowling.

There are several Categories ...  Equipment Manufacturers,  
Organistations, (UK) ProShops, (UK) Bowling Centres, Personal 
Websites, Misc., Coaching & Instructional websites, etc.


There will be some sub-categories.
eg:  Organistions will have ... Zones of WTBC,  National Organisations 
within

the Zones, UK organisations,  Disabled Bowling organisations, ...
eg:  Personal Website might have ... Bowler's,  Pro Bowler's, Leagues, 
etc.


Can anyone suggest how I should set out tables for this database ?



Here's one suggestion

Table:

URLs:
URL_ID
URL_TEXT

CATEGORY
CATEGORY_ID
CATEGORY_TEXT

SUBCAT
SUBCAT_ID
CATEGORY_ID
SUBCAT_TEXT

URL_CATEGORY
URL_ID
CATEGORY_ID
SUBCATEGORY_ID
PK: (URL_ID, CATEGORY_ID)

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Viable alternatives to SQL?

2009-08-27 Thread John Meyer

Kelly Jones wrote:

Many sites let you search databases of information, but the search
queries are very limited.

I'm creating a site that'll allow arbitrary SQL queries to my data (I
realize I'll need to handle injection attacks).

Are there other viable ways to query data? I read a little on
"Business System 12" (BS12), Tutorial D, and even something called
T-SQL (I think), but they all seem theoretical and not fully
implemented.

  

T-SQL stands for Transact-SQL, which is Microsoft's implementation of SQL

I want a query language that non-techies can use easily, but also
supports arbitrarily complex queries. Does such a language exist?

  

http://en.wikipedia.org/wiki/SQL#Alternatives_to_SQL


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



MySQL query working directly but not through .NET connection

2009-07-25 Thread John Meyer

Here's the query:

INSERT INTO 
USERS(USER_ID,USER_NAME,USER_SCREENNAME,USER_DESCRIPTION,USER_FOLLOWERS,USER_IMAGE,USER_FRIENDS,USER_LOCATION,USER_CREATEDAT) 
VALUES('31264066','Justin Wienkers','BabyVegaz','I’m your secondhand 
news/yeah. That and an (aspiring) screenwriter, trained journalist, 
blogger, and sometime (Answer B!tch) podcast 
co-host.',207,'http://s3.amazonaws.com/twitter_production/profile_images/139858445/2401_560553579174_20308516_34658042_5292221_n_normal.jpg',160,'Hollywood, 
CA',str_to_date('Tue Apr 14 23:29:15 + 2009','%a %b %e %H:%i:%s 
+ %Y'));


It works when I input it directly through the query browser, but not 
through my VB.NET code.


Dim sbInsert As New StringBuilder("INSERT INTO 
USERS(USER_ID,USER_NAME,USER_SCREENNAME,USER_DESCRIPTION,USER_FOLLOWERS,USER_IMAGE,USER_FRIENDS,USER_LOCATION,USER_CREATEDAT) 
VALUES(")

sbInsert.Append("'" & frnd.ID & "',")
sbInsert.Append("'" & frnd.name & "',")
sbInsert.Append("'" & frnd.screenname & "',")
'strReplaceString = frnd.description.Replace("'", "\'")
'Debug.Print(Asc(“))
'strReplaceString = strReplaceString.Replace(, "'")
'strReplaceString = strReplaceString.Replace(Chr(147), "\'")
'strReplaceString = strReplaceString.Replace(Chr(148), "\'")
strReplaceString = frnd.description
strReplaceString = strReplaceString.Replace("'", "")
strReplaceString = strReplaceString.Replace(, "")
strReplaceString = strReplaceString.Replace(Chr(147), "")
strReplaceString = strReplaceString.Replace(Chr(148), "")





sbInsert.Append("'" & strReplaceString & "',")
sbInsert.Append(frnd.followers & ",")
sbInsert.Append("'" & frnd.profimage & "',")
sbInsert.Append(frnd.friends & ",")
sbInsert.Append("'" & frnd.location & "',")
sbInsert.Append("str_to_date('" & frnd.createdate & "','%a %b %e 
%H:%i:%s + %Y'));")

Clipboard.SetText(sbInsert.ToString())
Dim myInsertNewUser As New MySqlClient.MySqlCommand(sbInsert.ToString, 
myTweetConn)

myInsertNewUser.ExecuteNonQuery()

Keep in mind that I have other queries that are working just fine.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: What OS is the best platform for MySQL ?

2009-07-08 Thread John Meyer
Carlos Williams wrote:
> On Wed, Jul 8, 2009 at 12:21 PM, John Meyer wrote:
>> Do we really need to bash OS's for MySQL.  Rather than questioning what
>> OS is best for MySQL we should ask how we can optimize MySQL for each OS.
> 
> Did I mis-read an email or can someone please explain to me how anyone
> has bashed a specific OS? I have only seen responses with what people
> suggest. Many even offered helpful suggestions for the OP to stay on
> FreeBSD rather than users saying FreeBSD sucks and Linux is crap
> running MySQL. Great suggestions from everyone!


A thread with the title "What OS is the best platform for MySQL" pretty
much is a troll line for bashing OS's. I'm not saying the responses are
good, I'm just saying that the premise of the thread is a little misguided.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: What OS is the best platform for MySQL ?

2009-07-08 Thread John Meyer
Ken Menzel wrote:
> Dan Nelson wrote:
>> In the last episode (Jul 06), Blog Tieng Viet said:
>>> I have been using MySQL on FreeBSD for 3 years and encounterd a lot of
>>> problems related to thread management.  And 1 year ago, I found that my
>>> FreeBSD box does not go well with any MySQL revision after 5.1.17-beta,
>>> because the MySQL thread does not end although complied with
>>> LINUX_THREADS.
>>
>> Try building without LINUX_THREADS; that option shouldn't really be used
>> with FreeBSD 6 or newer.
>>
> Also This article may help if you have not yet abandoned Freebsd.  It
> shows how freebsd can outperform Linux in some cases.


Do we really need to bash OS's for MySQL.  Rather than questioning what
OS is best for MySQL we should ask how we can optimize MySQL for each OS.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Date Time

2009-05-22 Thread John Meyer

Janek Bogucki wrote:

Hi John,

http://dev.mysql.com/doc/refman/5.1/en/date-and-time-types.html includes
some information about acceptable literal forms for dates and times.

'Thu May 21 03:15:28 + 2009' is not an acceptable literal form but
this is how to parse it APART from the time zone component. I could not
see from the documentation how to specify the time zone component so the
format below IGNORES the time zone.

mysql> create table t(d datetime);

mysql> insert into t(d) values(str_to_date('Thu May 21 03:15:28 + 2009', 
'%a %b %e %H:%i:%s + %Y'));
  
BTW, how would you work that with offsets that were a different value 
(say +0700).


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Date Time

2009-05-22 Thread John Meyer

Janek Bogucki wrote:

Hi John,

http://dev.mysql.com/doc/refman/5.1/en/date-and-time-types.html includes
some information about acceptable literal forms for dates and times.

'Thu May 21 03:15:28 + 2009' is not an acceptable literal form but
this is how to parse it APART from the time zone component. I could not
see from the documentation how to specify the time zone component so the
format below IGNORES the time zone.

mysql> create table t(d datetime);

mysql> insert into t(d) values(str_to_date('Thu May 21 03:15:28 + 2009', 
'%a %b %e %H:%i:%s + %Y'));

  

Thanks.  That'll work.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Date Time

2009-05-21 Thread John Meyer

Is "Thu May 21 03:15:28 + 2009" a valid date/time string?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Sun bought by Oracle

2009-04-20 Thread John Meyer
Yep. In particular the anti-trust division of the DOJ.
Kaushal Shriyan wrote:
>
> On Mon, Apr 20, 2009 at 11:14 PM, John Meyer  <mailto:john.l.me...@gmail.com>> wrote:
>
> I'm wondering what the DOJ is going to think of that deal.
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:  
>  http://lists.mysql.com/mysql?unsub=kaushalshri...@gmail.com
>
>
> DOJ ? does it mean Department of Justice ?
>
> Kaushal


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Sun bought by Oracle

2009-04-20 Thread John Meyer
I'm wondering what the DOJ is going to think of that deal.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: A good US Hosting Site?

2009-04-20 Thread John Meyer
I haven't had a problem with Hostgator yet. Prices are fair and
reasonable Also I've installed web apps through their portal and on my
own and haven't had a problem yet.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: freeware tools for repairing myisam tables

2008-11-11 Thread John Meyer

Yep.

Per Jessen wrote:

John Meyer wrote:

  

I'm trying to help out a friend with repairing myisam tables.  Does
anybody know the best freeware solutions if CHECK TABLE and REPAIR
TABLE don't do the job?



Did you try myisamchk ?


/Per Jessen, Zürich


  


--
Pueblo Bicycling
http://www.pueblobicycling.com
Actually looking forward to the daily commute


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



freeware tools for repairing myisam tables

2008-11-07 Thread John Meyer
I'm trying to help out a friend with repairing myisam tables.  Does 
anybody know the best freeware solutions if CHECK TABLE and REPAIR TABLE 
don't do the job?


--
Pueblo Bicycling
http://www.pueblobicycling.com
Actually looking forward to the daily commute


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



Re: Automatic email to database member on X date?

2008-07-07 Thread John Meyer

Or, you can use cron/at to schedule the task
Mauricio Tellez wrote:

Hi Aaron, I'm not sure if what you want can be done with MySQL, but what you
can do is a little script in python, php, etc, that query your database for
the members that expire at a given date, and then email them. Then you tell
cron o similar to execute your script as often as you require. Hope it helps

2008/7/4 Aaron Norlund <[EMAIL PROTECTED]>:

  

Hello all,

I have no experience with MySQL, but am reading through the available
texts. However, I feel what I need to do is probably way into these, so
perhaps someone could give me a hand.

I have taken over administering a website with a user database made with
MySQL. It keeps track of members of our owner's association. I would like to
set up a script that will automatically email member's when their membership
expiration is nearing.

Will someone please explain how this can be be accomplished, or point me
 in a direction to find out?

I'm not sure if it helps, but we 'manage' the database through phpMyadmin.

Thank you for your help!

Aaron N.


--
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]



Mysql Connection/NET and Visual Basic.NET 2008

2008-06-25 Thread John Meyer
I'm trying to start a connection to a mysql database, but even though 
I've installed the connector I don't see where the option to choose that 
data type of connection exists.


I'm using Connection/NET v 5.1, btw

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



Re: OT: Sun to buy Mysql

2008-01-16 Thread John Meyer

Brett Harvey wrote:

http://www.reuters.com/article/mergersNews/idUSWNAS661820080116

No offense, but this is definitely not off topic when it comes to MySQL

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



Re: MySQL Server not running

2007-10-12 Thread John Meyer
Given that FEHLGESCHLAGEN means "failed" and coupled with the proceding
text, I would assume that you don't have mysql installed in the first
place.  If you are on an rpm based system, try the following:

rpm -q mysql

If you don't get anything back, you need to reinstall.

Ananda Kumar wrote:
> if u do ps -ef | grep mysql, what do u get.
> 
> regards
> anandkl
> 
> 
> On 10/12/07, Daniel Bau <[EMAIL PROTECTED]> wrote:
>> He say he can not connect to the server --> no server is installed and no
>> socket is in
>> var/lib/mysql 
>>
>> When I install it he want to start the server and say "FEHLGESCHLAGEN"
>> No mysql server or manager
>> Or can not connect to mysql.sock
>>
>> So he not realy install the server and say me he has a problem with the
>> mysql_install_db but
>> dont tell me what for problem.
>> The message say i should execute the bug script and send it to you .
>>
>> Greetings
>> Bau Daniel
>>
>>
>> Datum:  Fri, 12 Oct 2007 14:45:45 +0530
>> Von:"Ananda Kumar" <[EMAIL PROTECTED]>
>> An: "Daniel Bau" <[EMAIL PROTECTED]>
>> Betreff:Re: MySQL Server not running
>> Kopie an:   mysql@lists.mysql.com
>>
>> what is the error ur getting.
>>
>> regards
>> anandkl
>>
>>
>> On 10/11/07, Daniel Bau <[EMAIL PROTECTED]> wrote:
>>> Dear MySQL Support team ,
>>>
>>> I have bis problems to upgrade my MySQL 3.23.58 Version on a Linux Red
>> Hat
>>> 3 system.
>>> I nearly download all MySQL Versions (4,5,6) and try to test them but
>>> nowbody work.
>>>
>>> I stopp my MySql Server, reinstall the old version and install the new
>>> with rpm.
>>>
>>> It never workes and when I instal the old version it works.
>>>
>>> I hope you can help me, in attachment the mysql_bug.script result
>>>
>>> Greetings from Germany
>>> Bau Daniel
>>> university for applied science
>>> www.fh-offenburg.de
>>>
>>>
>>> Der folgende Teil dieser Nachricht enthält einen Anhang im
>>> sogenannten Internet MIME Nachrichtenformat.
>>> Wenn Sie Pegasus Mail oder ein beliebiges anderes MIME-kompatibles
>>> Email-System verwenden, sollte Sie den Anhang mit Ihrem Email-System
>>> speichern oder anzeigen können. Anderenfalls fragen Sie Ihren
>>> Administrator.
>>>
>>> The following section of this message contains a file attachment
>>> prepared for transmission using the Internet MIME message format.
>>> If you are using Pegasus Mail, or any another MIME-compliant system,
>>> you should be able to save it or view it from within your mailer.
>>> If you cannot, please ask your system administrator for assistance.
>>>
>>>    Datei Information/File information ---
>>> Datei/File:  problem.txt
>>> Datum/Date:  11 Oct 2007, 16:12
>>> Größe/Size:  3405 bytes.
>>> Typ/Type:Text
>>>
>>>
>>>
>>> --
>>> 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]



Re: do I need two tables or one will do just fine?

2007-10-06 Thread John Meyer

Afan Pasalic wrote:

hi,
I have a employees table (first name, last_name, address, city, state, 
zip, phone,...).
though, I got a requested to add additional info about people, like 
phone_extension, zip+4, nick, DOB... that will not be used very often.

what would be better solution:
a) add these columns to employees table
b) create separate table employees_addition_info with these fields and 
store info if any (with employee_id of course)


one friend of mine suggest me to keep all data in one table since the 
"empty" fields will be NULL and  there will not be a lot of wasted 
space. specially because I'll never have more than 200K records (right 
now I have about 50K records). and "normalization" will not improve a 
lot?


any suggestions?



Keep the one table.
Unless you can make the case that all of those attributes can be 
logically grouped together, I'd keep them in the primary table to 
eliminate unnecessary joins.  And as far as "normalizing", you're pretty 
much setting up tables employee_info_1 and employee_info_2 and when you 
end the table name or field name with a number, that's a big clue you're 
not normalizing the data.


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



Re: about the username and hostname

2007-06-28 Thread John Meyer
Weiqi Wang wrote:
> Dear everyone:
>
> I start mySQL by a shotcut in windowsXP so that I don't have to input my 
> username, just password is required. That brings in a problem: I don't know 
> my user name(I suppose it to be "root") and the server host, etc. Is there 
> anyway I can find it out? (I suppose the server host is the localhost but I'm 
> not sure)
>
> Thanks very much for any help!
>
>
>
>
> Best Regards,
>
>
> yours sincerely,
>
> Weiqi 
>
>   


Okay, are you bringing up the client or the server?

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



Re: Document archiving

2007-06-28 Thread John Meyer
Eddy D. Sanchez wrote:
> Thanks for your answer.
>
> I'm searching an opensource project (based on mysql obviously) that I
> can hack for my needs, but if I can't find anything, I must make one,
> my intention for technology is:
> -Java for application server and framework

Might I ask why you need Java per se.  Is it just because you want
platform independence?  If so, there are multiple ways to get to that. 
Nailing yourself down on a particular language will end up limiting your
field of options.

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



Re: Document archiving

2007-06-28 Thread John Meyer
Eddy D. Sanchez wrote:
> Hello Everyone.
>
> I want to scan a large quantity of books and documents and store these
> like images inside or outside a database, I want use mysql, anyone
> have any experience with this kind of systems, can you suggest me an
> opensource solution ??

First question I would have for you is do you need instant (as opposed
to just want) retrieval  of that information over the computer, or do
you have them located in a library somewhere.  If it's the latter, you
may want to use something like mysql to just store key information about
those documents like title keywords etc and their location just to
reduce redundency.  I'd hate to think of the bill for all those manhours
scanning books even if they are, say, only 50 pages each.

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



Re: Document archiving

2007-06-28 Thread John Meyer
David T. Ashley wrote:
>
> Also, I have to say this to be complete ...
>
> You were aware, of course, that nearly every modern copyright for books
> prohibits digitizing the book and using it in any kind of document
> retrieval
> system?  In fact, I believe a violation has occured even if it is scanned
> and the data is never used.
>
> I just had to say this.  I don't know how U.K. prisons are, but here
> in the
> U.S. they are full of large unpleasant men who have done bad things
> and may
> do more bad things ... to you, for example.
>
And the concept that he's using these on internal documents that his
company owns the copyright on didn't occur to you?


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



Re: restore one database.

2007-05-27 Thread John Meyer
Ananda Kumar wrote:
> Hi Pelle,
> I dont have enough space on any other storage, so i was thinking if we
> would
> just restore one database from dump that would save lot  of time , rather
> than restoring all the database.
>
> regards
> anandkl
>
>>
Well, if only one database is important enough to back up, then yes it
will.  But if you have multiple databases that you are actively using
then you'll need to back them all up.  You don't necessarily need to use
an all databases dump, though.


-- 
The NCP Revue -- http://www.ncprevue.com/blog


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



Tellico and MySQL

2007-05-26 Thread John Meyer
I'm still searching online, but does anybody know of a script that will
input a tellico database into MySQL?

-- 
The NCP Revue -- http://www.ncprevue.com/blog


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



Re: Database design

2007-05-23 Thread John Meyer
Officelink wrote:
> Hi everyone,
>
> I¹m trying to set up a database with information that will be used in a
> garment slideshow in flash.
>
> The information to be included as part of the slideshow would be:
> code, optional title, description, colours, sizes, garment image, fabric
> swatch image
>
> Each clothing item to be included in the slideshow will belong to one of
> eleven or so categories. Each of the categories will belong to one of two
> category types.
>
> I also planned to set up a simple CMS that would allow the information to be
> added, edited and deleted from the database.
>
> With the above goals in mind, I came up with two tables as follows:
>
> GARMENTS TABLE
> garment_id, int(11), not null, auto_increment, primary key
> cat_id, int(10), unsigned, not null, default 0
> garment_code, varchar(30), not null
> garment_title, varchar(40), null
> garment_desc, varchar(255), not null
> garment_image, varchar(50), not null
> garment_colour, varchar(50), not null
> garment_swatch, varchar(50), null
> garment_sizes, varchar(100), not null
>  
> CATEGORIES TABLE
> cat_id, int(10), not null, auto_increment, primary key
> cat_name, varchar(40), not null
> cat_type, tinyint(4), not null, default 1
>
> I was worried about repeating data in some of the columns, for example the
> garment_desc column would have information about sleeve length, cuff type,
> fabric, fabric composition etc. and I thought that all these areas could
> possibly be broken up into separate tables, but I wasn¹t sure if it was
> necessary. Also the colour and size columns would have a lot of repetitive
> data.
>   

While normalization does have the goal of eliminating repetition, there
are other reasons.  Most notably, you don't want to introduce errors or
even differences into your database. 
A person who accidentally types "eRd", for instance.  You might, and I
emphasize the word "might", consider breaking color and size into two
different tables based upon the following:
1.  The possible set of "valid" answers.
2.  Whether that element will be used in any sort of grouping or
searching level (are you able to search by color, for instance)

-- 
The NCP Revue -- http://www.ncprevue.com/blog


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



Re: Scheduled backups

2007-05-14 Thread John Meyer
Mike Blezien wrote:
> Hello,
> - Original Message - From: "John Meyer" <[EMAIL PROTECTED]>
> To: "MySQL General" 
> Sent: Monday, May 14, 2007 10:26 AM
> Subject: Re: Scheduled backups
>
>
>> J Trahair wrote:
>>> Hi Everyone
>>>
>>> I have set up a scheduled backup using MySQL Administrator. Stored
>>> connection, database, dates and time, even the Windows user password
>>> (in fact, blank). It doesn't start at the correct time, or indeed
>>> any time.
>>>
>>> Have I missed something?
>>>
>>> Thanks for your help.
>>>
>>> Jonathan Trahair
>>>
>>
>> OS and version?
>>
>
> this is a nice MySQL B/U bash script we've been using for sometime and
> works quite nicely, on a LINUX  system.
> MySQL Backup Script VER. 2.5 -
> http://sourceforge.net/projects/automysqlbackup/

Actually, he told me he was on Windows XP.
One thing I have to wonder about, though; in terms of security, okay,
maybe you don't want your password stored in a plain text file, but is
there anyway around that other than setting the password as blank?

-- 
The NCP Revue -- http://www.ncprevue.com/blog


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



Re: Scheduled backups

2007-05-14 Thread John Meyer
J Trahair wrote:
> Hi Everyone
>
> I have set up a scheduled backup using MySQL Administrator. Stored 
> connection, database, dates and time, even the Windows user password (in 
> fact, blank). It doesn't start at the correct time, or indeed any time.
>
> Have I missed something?
>
> Thanks for your help.
>
> Jonathan Trahair
>   

OS and version?


-- 
The NCP Revue -- http://www.ncprevue.com/blog


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



Re: Which is a better design?

2007-05-09 Thread John Meyer
James Tu wrote:
> The database server and the web server are on separate machines.
> Table A contains a record for each user.
> Let's say Table B contains 'relationship' information.  They can be of
> type 'friend' or 'family'.
> If a user knows another user, this relationship would be kept in this
> table, along with the type of relationship.  Table B can get big.
> 10,000's or maybe 100,000's.
>
>
> I'm doing a query in PHP and want to end up with two arrays.
> One for type friend and one for type family.
>
> Which is better:
> (Method 1) Do ONE query for all the records that meet a certain
> criteria (let's say 'active').  Then use PHP to loop through the
> results and put each record into either the friend array or the family
> array.
>
> (Method 2) Do TWO queries.  One just for friend.  Loop through the
> records and put into friend array;
> Then do another query for family...and loop through again.
>
>
> Method (1) needs to evaluate an IF statement in PHP for every record.
> Method (2) hits the database twice, but doesn't require a PHP IF.
>
> (Should I take an extra hit on the database and use Method 2?)
>
> -James
>
Either way, I think you are running into a problem with just having two
arrays.  Keep in mind that the relationship is relative, so to speak.  A
person who is a friend is not an absolute friend; they are going to be a
friend of somebody else.

With that in mind, assuming that you just want two "absolute" arrays,
here's what I would suggest (and this is a shot in the dark)
Given:
USER
USER_ID
   'more columns

AND
RELATIONSHIP
RELATIONSHIP_ID
FRIEND_A
FRIEND_B

$query = "SELECT USER.*,RELATIONSHIP_DESCRIPTION FROM USER LEFT JOIN
RELATIONSHIPS ON (USER.USER_ID = RELATIONSHIP.FRIEND_A OR USER.USER_ID =
RELATIONSHIP.FRIEND_B)";

$retval = mysql_query($query) or die(mysql_error);
while ($row = mysql_fetch_array($retval, MYSQL_ASSOC)) {
  $array[$row["USER_ID"];
}


-- 
The NCP Revue -- http://www.ncprevue.com/blog


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



Re: Replace, Substitute, Delete

2007-05-09 Thread John Meyer
John Kebbel wrote:
>   For years, I've been using FileMaker Pro to generate a staff photo
> gallery and staff phone directory from the same table of staff
> information. I'm switching to PHP/MySQL for the year ahead. In STEP 1
> below, I concatenate a name for the teacher/staff person image and in
> STEP 3 I concatenate an XHTML table cell for the image and name. Steps 1
> and 3 have been tested and work fine. I don't know how to accomplish
> STEP 2 however. Suppose I start with a last name like De Long or Van
> Schmidt? I wind up with de lonxx.jpg or van scxx.jpg for my image names.
> I have a superstitious dread of putting spaces in Linux/Unix web file
> names. Could someone suggest a way to replace the " " in imgName with
> ""?
>   
> STEP 1: Create the root of the image name
> update staff set imgName = Lower(CONCAT(Left(last,6),Left(first,2)));
>
> STEP 2: 
> How do I delete spaces in the imgName?
>
> STEP 3: 
> update staff set webLine = CONCAT(" width='100' height='125'>",first," ",last,"");
>
>   Thanks in advance for your time spent in reading or responding.
>
>
>   
In MySQL itself, check out the Replace() function:
http://dev.mysql.com/doc/refman/5.1/en/string-functions.html#function_replace

In *nix (and by the way, a space really isn't that big of a deal as
people make it out to), you may want to do a perl script to find and
replace the spaces.

-- 
The NCP Revue -- http://www.ncprevue.com/blog


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



Re: Millisecond time stamp

2007-04-18 Thread John Meyer

John Comerford wrote:
Thanks for the replies guys, banging my head against the wall for not 
thinking of using an auto increment integer to handle the sequence, 
I've got to cut back on those Friday night beers



Okay, color me confused, but what exactly are you wanting to do anyway?


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



Re: How can I do something like this in mySQL...

2007-04-07 Thread John Meyer

John Kopanas wrote:

I have a query that looks something like this:

SELECT (c_o_w_inst_rev - c_o_w_estcost)/c_o_w_inst_rev
FROM tmpGovernmentSummaries

The problem is that sometimes c_o_w_inst_rev is 0 and dividing by zero
returns a NULL.

If c_o_w_inst_rev == 0 how can I return 0 for the SELECT above instead
of NULL?  Can I test in the SELECT if c_o_w_inst_rev is 0 and return 0
and if not do the math?

Insight would be greatly appreciated :-)



http://dev.mysql.com/doc/refman/5.1/en/control-flow-functions.html#function_ifnull


HTH

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



Re: Problem with authentication

2007-04-04 Thread John Meyer

Mahmoud Badreddine wrote:

Hello to all
I had an old MySQL 4.0 running on a Windows Machine.
I removed that version and I installed the MySQL 5.0 .

When I went to run phpMyAdmin this is the error I receive.
#1251 - Client does not support authentication protocol requested by 
server;

consider upgrading MySQL client


Although the password that's in config.inc.php is the same as the one I use
on the MySQL command login and that one works fine.
What is still lingering from my old installation that's prventing me from
loggin in , if any. Thank you.




What version of PHP are you running and what server?

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



Re: Speed of queries in a MySQL database

2007-03-04 Thread John Meyer

Jonathan Trahair wrote:

Hi Everyone.

I have just upgraded a Visual Basic 6 project which used an Access database as 
a data back end, using DAO and SQL strings. The Access database was exceedingly 
slow, and prone to glitches. I have changed the VB code to ADO, and set up a 
MySQL database in the hope that the MySQL database would be better suited to 
the large size of some tables, and would therefore return queries more quickly. 
It is now populated with the data from the old Access tables.

So far, the MySQL speed has been very slow. I'm talking about 30 seconds to 
return the 2 records found by
SELECT * FROM OrderItems WHERE CustomerCode = 'ABE001' AND InvoiceNo = 0 ORDER 
BY OrderNumber, ProductCode, Colour, RecNo
from the OrderItems table - 309,000 rows (ie. records). And this is in the 
MySQL Query Browser, not the VB code.

Database information: all 23 tables use the InnoDB, 2 tables have more than 
276,000 records, most have a lot less. Uses ODBC.

My questions are:
1. Have I chosen the right database? What databases do people use which return 
data from huge tables in micro-seconds (well, alright, seconds, then!)?
2. Should I set up the database in a different way, if so, how?
3. Is this the right list for such questions?

Thanks in advance.

Jonathan Trahair
  


Have you thought about putting in an index on CustomerCode?  And have 
you run EXPLAIN on your select statement?


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



Re: Query Two Databases

2007-02-13 Thread John Meyer
Neil Tompkins wrote:
> Following on from the email below, if I run the query
> 
> SELECT * FROM database1.table, database2.table
> 
> I get the data back, but all the data is in the same row.
> 
> How can I seperate the records ?
> 
> Regards
> Neil
> 
>

Barring an upgrade, it seems your best bet would be to use a scripting
solution, such as PHP or perl, that could accomplish the same thing.

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



Re: myISAM Max File Size?

2007-02-08 Thread John Meyer
Phil Butterworth wrote:
> Can anyone please tell me what the Max size a myISAM file can grow too?
> Thanks
> Best Regards
>  
> Phil Butterworth  
>    
>  
> 
http://lists.mysql.com/mysql/204119

Funny what google can do for you, wot say?

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



Re: Visual Basic 6 + MySQL

2007-01-21 Thread John Meyer
Nuno Vaz Oliveira wrote:
> Hello John,
>> Anybody in here think of http://www.vbmysql.com?
>>
> 
> The site is not working correctly :(
> 
> I've found a lot of references to that site but the articles are all
> missing.
> 


This article isn't missing:

http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/

Nor is this one
http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-1/

Nor this one:

http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-7/

I guess if you could point out which articles are missing, we could help
you then, but so far, all the articles seem to be there.

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



Re: Visual Basic 6 + MySQL

2007-01-21 Thread John Meyer
Anybody in here think of http://www.vbmysql.com?

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



Re: Setting Up MySQL Administrator

2006-10-07 Thread John Meyer

David Blomstrom wrote:

OK, I'm halfway there. But I don't understand what you mean by "saved 
settings." Is there some sort of default value I can try?

Also, if I can't recover my password, is there a file I can open and retrieve 
it from?

I tried it with localhost, Port 3306, Username: root and the password of one of my databases 
(but nothing under "Stored Connection") and got MySQL error #1045 - "Access 
denied for user 'root'@'localhost' [using password: YES]
  



no, this is a password for the root user on your mysql server.


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



Re: Setting Up MySQL Administrator

2006-10-07 Thread John Meyer

David Blomstrom wrote:

I just downloaded MySQL Administrator and am now trying to set it up. Can anyone tell me what "stored 
connection" and "Server Host" mean? I'm using Apache on Windows XP, but I'm not sure what they 
mean by Server Host. 3306 is listed under "Port" by default.

Also, what are the default username and password for MySQL? I have a username and 
password for my database, but I don't recall creating them for the overall MySQL program. 
As I recall, "root" serves as the username or password.

Thanks.


  



Assuming that you installed mysql (and keep in mind, we're talking about 
your MYSQL, not apache), then stored connection refers to the saved 
settings.
"Server Host" is either the ip or the domain name of your server.  If 
you're talking to your local MySQL server, then it's "localhost".  As 
far as the username and password, when you installed the mysql server 
itself, it should have asked you to create a password for the "root" 
user, just type that in.  Username is the username that you set up, 
probably root.



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



Re: [PHP] switch()

2006-08-29 Thread John Meyer

[EMAIL PROTECTED] wrote:

Why do you want to use a switch in this particular instance.  You're
comparing apples and oranges (in this case, col_1 and col_2).  You use
swithc to evaluate one variable against a number of choice, not multiple
variables against variable choices.




I'm not comparing apples and oranges - just have such a "case", but looks
like I'm wrong about using switch() on wrong place. Just thought it could
do it.
:)
  



What you're saying in that case is either col_1 evaluates to value1 or 
col_2 evaluates to value2.  Unless you have some program logic to 
prevent both from being true, you are comparing apples and oranges.  And 
any time col_1, evaluates to true, the "break" keyword will stop your 
switch ladder.  Remove break, and that won't happen.  of course, if you 
do that, then the question arises about why you are using a switch 
ladder in the first place.


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



Re: [PHP] switch()

2006-08-29 Thread John Meyer

[EMAIL PROTECTED] wrote:

I have something like this:



when I tried to use swiitch()


it will give me only the first true case. if $result['col_1'] == 'value_1'
is true 2nd case will never be executed?
Does it mean I CANNOT use switch() in this case?

-afan

  
Why do you want to use a switch in this particular instance.  You're 
comparing apples and oranges (in this case, col_1 and col_2).  You use 
swithc to evaluate one variable against a number of choice, not multiple 
variables against variable choices.


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



Re: mysql naming convention

2006-08-11 Thread John Meyer
Barry wrote:
> Hello everyone!
> 
> I am looking for a standard naming convention for databases.
> 
> For example: is it good to use tablenames in column names like:
> table => tb_id,tb_text,tb_name

I've for a long time been using an uppercase notation for databases.
Probably isn't the best system, but it's what I've worked with so far.
That and naming the primary key on a table with the suffix ID.  Foreign
Keys have the same name as they do on primary keys.   Simple, strong,
ugly, and dignified

-- 
John Meyer
http://pueblonative.wordpress.com
http://pueblonative.110mb.com/board

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



Re: Can a row be refered using row number?

2006-08-10 Thread John Meyer
Bartis, Robert M (Bob) wrote:
> Why would you want to do this? As data moves around within the table the 
> updates will be in error. Wouldn't it be easier to assign a unique key to 
> each row, search for the key or unique set of information and update the 
> resulting row?
> 
> Bob

I don't know, maybe that's what Ravi was referring to.  In which case,
I'd direct ravi to the auto_increment attribute for an INT and the
primary key.


-- 
John Meyer
http://pueblonative.wordpress.com
http://pueblonative.110mb.com/board

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



RE: Database design question

2006-08-07 Thread John Meyer
One table, 
USERS

Another table
MESSAGES
With a foreign key referencing users.
Maybe a second foreign key referencing the destinating user as well.


-Original Message-
From: James Tu [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 07, 2006 1:56 PM
To: mysql@lists.mysql.com
Subject: Database design question

I want to design a database for lots of users.  Each user will be managing
their own messages.  Does it make sense to create a table for each user
after they've registered?
Or should I just create one MESSAGES table and store messages there keyed
off of their user_id?

If I create a table for each user (I can potentially have hundreds of
thousands of users), will MySQL be able to handle this?
If I just have one table, I could potentially have millions of records in
one table.  Will MySQL be able to handle this?

My gut feel is that MySQL will be fine with one table and millions of
records.

Thanks.
-James


--
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]



RE: Backup SQL

2006-08-04 Thread John Meyer
If you're using Myphpadmin, you can turn this option off when generating the
dump file.

-Original Message-
From: Chris White [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 04, 2006 12:14 PM
To: mysql@lists.mysql.com
Subject: Re: Backup SQL

On Friday 04 August 2006 10:35 am, Daniel da Veiga wrote:
> What if each .sql contains a "DROP TABLE IF EXISTS" statement at the 
> start? Something to be carefull if its the program that generated the 
> backup likes to add this tags.

What if my website code breaks?  This train of "what if" type questions can
easily be answered by a quick skim through the sql before running it.  If
you believe that to be tiresome, think of how long it's going to take you to
get order from chaos when things go down.
--
Chris White
PHP Programmer/DBirth
Interfuel

-- 
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]



Re: AW: Query problem

2006-08-03 Thread John Meyer
André Hänsel wrote:
>> -Ursprüngliche Nachricht-
>> Von: Miles Thompson [mailto:[EMAIL PROTECTED] 
>> Gesendet: Donnerstag, 3. August 2006 21:56
>> An: mysql@lists.mysql.com
>> Betreff: Re: Query problem
>>
>> At 03:08 PM 8/3/2006, André Hänsel wrote:
>>
>>> I have a table logging downloads (time, username, download).
>>>
>>> Now I'd like to have the last 5 downloads per user.
>>>
>> That's almost like creating a view of users, then stepping 
>> through the 
>> view, selecting * limit 5 where username = view.username. See 
>> where that's 
>> headed? You may need a temporary table.
> 
> Assuming I have a (temporary) table of usernames, how can that be of any
> help?
> 
> 
all right, here's how this goes.

Create a stored procedure
WHERE YOU SELECT DISTINCT username.
Then for each user,
retrieve the five 5.
Put them in a union,
enjoy.

-- 
John Meyer
http://pueblonative.wordpress.com
http://pueblonative.110mb.com/board

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



Re: AW: Query problem

2006-08-03 Thread John Meyer
SELECT DISTINCT username, time, download
FROM table
 ORDER BY time DESC
GROUP BY username

André Hänsel wrote:
> Hi Dan, hi Obed,
> 
> of course I have no specific username, I want the last 5 downloads of each
> distinct username in the table. :)
> 
> Regards,
> André
> 
>> -Ursprüngliche Nachricht-
>> Von: Dan Buettner [mailto:[EMAIL PROTECTED] 
>> Gesendet: Donnerstag, 3. August 2006 20:15
>> An: André Hänsel
>> Cc: mysql@lists.mysql.com
>> Betreff: Re: Query problem
>>
>> For a specific username:
>>
>> SELECT username, time, download
>> FROM table
>> WHERE username = 'someusername'
>> ORDER BY time DESC
>> LIMIT 5
>>
>> Dan
>>
>> On 8/3/06, André Hänsel <[EMAIL PROTECTED]> wrote:
>>> Hi,
>>>
>>> I have a table logging downloads (time, username, download).
>>>
>>> Now I'd like to have the last 5 downloads per user.
>>>
>>> Can someone tell me a solution (or what to search for)?
>>>
>>> Regards,
>>> André
>>>
>>>
>>> --
>>> 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]
>>
> 
> 


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



Re: Check out this Free software I found to document your IT infrastruct

2006-08-03 Thread John Meyer

I think equating a tagline indicating something's been spam-checked
with a full out message for a web product is a little absurd.

On 8/3/06, Ian <[EMAIL PROTECTED]> wrote:


You say you hate spam then spam the list with an advert for McAfee!

Ian


--
"I'm American, fatboy.  What's your excuse?"

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



RE: Doing a join

2006-08-02 Thread John Meyer
Sorry, but that's how I was normally trained to use SQL and to name
variables.  I know netiquette, it's just how I was trained on the system.

-Original Message-
From: Jay Pipes [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 02, 2006 11:35 AM
To: John Meyer
Cc: mysql@lists.mysql.com
Subject: Re: Doing a join

On Wed, 2006-08-02 at 11:13 -0600, John Meyer wrote:
> I have two tables:
> 
> 
> MEMBERS:
> MEM_ID
> ...
> 
> GROUPS:
> GRO_ID:
> ...
> 
> And one joiner
> 
> MEM_GRO:
> MEM_ID, GRO_ID
> 
> 
> I want to print out a list like this
> 
> GROUP_NAME, NUMBER_OF_MEMBERS
> 
> Even when the number of members is 0, how do I do that?

SELECT G.NAME AS GROUP_NAME , COUNT(*) AS NUMBER_OF_MEMBERS FROM GROUPS G
LEFT JOIN MEM_GRO AS M ON G.GRO_ID = M.GRO_ID GROUP BY G.GRO_ID;

By the way, when you use ALLCAPS for everything, it makes it very difficult
to pick out SQL keywords, and MAKES IT SEEM LIKE YOU ARE SHOUTING.

-jay




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



RE: Doing a join

2006-08-02 Thread John Meyer
Yeah, I just figured it out ten minutes ago, one of those stupid little
oversites on my part.

-Original Message-
From: Martin Jespersen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 02, 2006 3:40 PM
To: John Meyer
Cc: mysql@lists.mysql.com
Subject: Re: Doing a join

select g.GROUP_NAME, count(mg.MEM_ID) as NUMBER_OF_MEMBERS from GROUPS g
left join MEM_GRO mg using(GRO_ID) group by g.GRO_ID


John Meyer wrote:
> I have two tables:
> 
> 
> MEMBERS:
> MEM_ID
> ...
> 
> GROUPS:
> GRO_ID:
> ...
> 
> And one joiner
> 
> MEM_GRO:
> MEM_ID, GRO_ID
> 
> 
> I want to print out a list like this
> 
> GROUP_NAME, NUMBER_OF_MEMBERS
> 
> Even when the number of members is 0, how do I do that?
> 
> 
> 



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



RE: Is this query possible?

2006-08-02 Thread John Meyer
I've dealt with this in terms of Books and Titles.  Those two are separate:
one title can have many book editions published in it.  Also, you can have a
book with multiple titles (anthology, for instance).
I suppose it is possible for album not to be the same as cd title,
particularly if you have old vinyl albums around that you want to sell.

-Original Message-
From: Brent Baisley [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 02, 2006 2:13 PM
To: Tanner Postert; mysql@lists.mysql.com
Subject: Re: Is this query possible?

I'm not sure why you split out track, track is really kind of an attribute
of a song. Especially since you have artist and album with the song.
Wouldn't album be the same as cd title? I'm not quite getting the logic of
your schema.




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



RE: Check out this Free software I found to document your IT infrastructure

2006-08-02 Thread John Meyer
You know this might be a little bit more convincing if you gave the name of the 
product and a little bit more personal reason why you recommended it other than 
"check out brand x product" I vote this is spam.

-Original Message-
From: itguy321 [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 02, 2006 1:06 PM
To: mysql@lists.mysql.com
Subject: Check out this Free software I found to document your IT infrastructure


Hey guys, I just found this great free software that lets you document your 
entire IT infrastructure.  In my opinion it's the best software out there and 
the fact that it is free is just an added bonus.  Just thought I would let you 
guys know if you want to give it a shot it’s working out great for us.

http://www.ecora.com/ecora/products/documentor.asp

--
View this message in context: 
http://www.nabble.com/Check-out-this-Free-software-I-found-to-document-your-IT-infrastructure-tf2041675.html#a5620241
Sent from the MySQL - General forum at Nabble.com.


-- 
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]



Doing a join

2006-08-02 Thread John Meyer
I have two tables:


MEMBERS:
MEM_ID
...

GROUPS:
GRO_ID:
...

And one joiner

MEM_GRO:
MEM_ID, GRO_ID


I want to print out a list like this

GROUP_NAME, NUMBER_OF_MEMBERS

Even when the number of members is 0, how do I do that?



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



RE: Database Return Errors

2006-08-02 Thread John Meyer
Have you checked out MyConnector/NET and the MySqlException class?

-Original Message-
From: Asif Lodhi [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 02, 2006 6:17 AM
To: mysql@lists.mysql.com
Subject: Database Return Errors

Hi,

I am developing a VB6 app with a MySQL-5.0.22/WinXP backend.  I have skimmed
the Stored Procedures/Triggers docs and it looks like I can define custom
error-names or number - though I have also seen the "Handlers" in the same
doc.

The question is:  Can I get the error-codes or error-names that MySQL
returns in VB6',s ADO.Erross collection?  Will I get one if MySQL throws an
error - such as when a duplicate constraint is violated?  ->  so that I can
display meaningful error messages to the user.

--
TIA,

Asif

--
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]



Re: MySQL 4.1.21 has been released

2006-07-28 Thread John Meyer
l.com/15328)
>* Binary log lacked character set information for table name
>  when dropping temporary tables.
>  (Bug#14157: http://bugs.mysql.com/14157)
>* InnoDB did not increment the handler_read_prev counter.
>  (Bug#19542: http://bugs.mysql.com/19542)
>* Slave SQL thread cleanup was not handled properly on Mac OS X
>  when a statement was killed, resulting in a slave crash.
>  (Bug#16900: http://bugs.mysql.com/16900)
>* mysqldump did not respect the order of tables named with the
>  --tables option. (Bug#18536: http://bugs.mysql.com/18536)
>* The server no longer uses a signal handler for signal 0
>  because it could cause a crash on some platforms.
>  (Bug#15869: http://bugs.mysql.com/15869)
>* LOAD_FILE() returned an error if the file did not exist,
>  rather than NULL as it should according to the manual.
>  (Bug#10418: http://bugs.mysql.com/10418)
>* Use of uninitialized user variables in a subquery in the FROM
>  clause results in bad entries in the binary log.
>  (Bug#19136: http://bugs.mysql.com/19136)
>* IS_USED_LOCK() could return an incorrect connection
>  identifier. (Bug#16501: http://bugs.mysql.com/16501)
>* Concurrent reading and writing of privilege structures could
>  crash the server. (Bug#16372: http://bugs.mysql.com/16372)
>* A statement containing GROUP BY and HAVING clauses could
>  return incorrect results when the HAVING clause contained
>  logic that returned FALSE for every row.
>  (Bug#14927: http://bugs.mysql.com/14927)
>* MONTHNAME(STR_TO_DATE(NULL, '%m')) could cause a server crash.
>  (Bug#18501: http://bugs.mysql.com/18501)
>* The ref optimizer could choose the ref_or_null access method
>  in cases where it was not applicable. This could cause
>  inconsistent EXPLAIN or SELECT results for a given statement.
>  (Bug#16798: http://bugs.mysql.com/16798)
>* ANALYZE TABLE for TEMPORARY tables had no effect.
>  (Bug#15225: http://bugs.mysql.com/15225)
>* When myisamchk needed to rebuild a table, AUTO_INCREMENT
>  information was lost. (Bug#10405: http://bugs.mysql.com/10405)
>* No error message was being issued for storage engines that do
>  not support ALTER TABLE. Now an ER_NOT_SUPPORTED_YET error
>  occurs. (Bug#7643: http://bugs.mysql.com/7643)
>* The binary log would create an incorrect DROP query when
>  creating temporary tables during replication.
>  (Bug#17263: http://bugs.mysql.com/17263)
> 
> 
> Enjoy!
> Joerg
> 

Is there still development going on of mysql 4?

-- 
John Meyer
Programmer, Database author
"Here's something to think about: How come you never see a headline
titled "Psychic Wins Lottery""---Jay Leno

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



Re: database back up

2006-07-20 Thread John Meyer

Joko Siswanto wrote:

Dear All

if myqsl service can't start, where can i found the file and back up it?
[under windows and linux]

Thanks,
Joko Siswanto


What file are you looking for?

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



Re: PostgreSQL or mySQL

2006-07-03 Thread John Meyer

Chris White wrote:

On Sunday 02 July 2006 12:22 pm, Kirti S. Bajwa wrote:

I have very little knowledge of either PostgreeSQL or mySQL. Please advise
me as to which of these two software package to use? I need some specific
examples as to superiority of one package over the other. I prefer using
the package which has a goof GUI database design.


I hate to say this but, if you want objective/non-biased answers, you're 
better off looking for a general database list, then posting to 2 lists that 
are very database implementation specific.  In fact, why not just google 
around for "Postgres MySQL comparison" or something of the like.




I thinki you're (not you Chris) are missing the point as well, "good GUI 
design"?  I think you're looking for a prettier front end than you are 
in the specific bank-end database.



--
Online library -- http://pueblonative.110mb.com
138 books and counting.

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



Re: Re-importing a mysqldump file

2006-06-25 Thread John Meyer

Ian Barnes wrote:

Is this possible? Or would the best way be to import the dumped file into a
temp table and then select out of the temp table into my correct table ?




Anyway to use a trigger?

--
Online library -- http://pueblonative.110mb.com
126 books and counting.

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



Re: Sad, I know...

2006-06-07 Thread John Meyer

tomáz rezistänz wrote:

I wish I could uninstall mySQL and start over but I don't know how..

On 6/7/06, tomáz rezistänz <[EMAIL PROTECTED]> wrote:



Do you know how to dump your mySQL databases?

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



Re: [PHP] corrupt pdfs

2006-05-31 Thread John Meyer

tedd wrote:

Yes, I was wondering that myself considering the onslaught of "no-no's" one 
gets by suggesting placing images into a dB. A PDf file is really not that much different 
and probably better served via file system.

tedd


On the other hand, you get control of the images, as opposed to relying 
upon a server that may or may not be up.  I'm not saying that putting 
binaries in databases is _always_ the right solution, however, there are 
times where it is a desired system.


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



Re: MySql GUI

2006-05-31 Thread John Meyer

Chris Sansom wrote:

At 19:44 +1000 31/5/06, Logan, David (SST - Adelaide) wrote:

I would agree, I have found it useful as well. It does have a few
limitations (well the versions I've used)


BTW, what are the limits on OpenOffice's Base being used as a front end?

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



Re: Query problem

2006-05-30 Thread John Meyer

Rhino wrote:


- Original Message - From: "John Meyer" <[EMAIL PROTECTED]>
To: "List: MySQL" 
Sent: Tuesday, May 30, 2006 5:09 PM
Subject: Query problem



Setup

TITLES:
TITLE_ID


AUTHORS:
AUTHOR_ID


TITLE_AUTHOR:
(TITLE_ID,AUTHOR_ID)


Problem:
Given a title, I need to find all the authors who aren't connected 
with that particular book.




That's a pretty odd requirement, I must say. If your database has 
thousands or millions of books, you'd have to assume that virtually ALL 
of the authors in the database are NOT connected with a particular book.


Actually, this is more along the lines of a PHP form where I am adding 
an author to a title when the title is in the database.  I want to 
create a select list where the current authors in the database are 
shown, but not the ones already associated with that title.
Oh yeah, and one other thing, title and book are not synonymous in this 
one.  I'll give you the breakdown:


TITLES:
TITLE_ID

AUTHORS:
AUTHOR_ID

TITLE_AUTHOR:
(TITLE_ID,AUTHOR_ID)

BOOKS:
BOOK_ID

TITLE_BOOK:
(BOOK_ID,TITLE_ID)

EDITORS:
(BOOK_ID,AUTHOR_ID)

Complex enough for you? ;-)

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



Query problem

2006-05-30 Thread John Meyer

Setup

TITLES:
TITLE_ID


AUTHORS:
AUTHOR_ID


TITLE_AUTHOR:
(TITLE_ID,AUTHOR_ID)


Problem:
Given a title, I need to find all the authors who aren't connected with 
that particular book.


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



Kinda OT: Book database question

2006-02-01 Thread John Meyer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi, I'm trying to develop my own book database, and I have a question
about ISBN: Is that number linked to a book or to a title?  That is, can
one title (say, Huckleberry Finn) have several ISBNs associated with it
through several book releases?
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFD4Sodj60GAoLuoDkRAmciAJ9NENzEBwW5vKNscbbKxIrYrGBLYQCdF4PN
n1hv7E1N51UJPLhVtxY+TOY=
=BNae
-END PGP SIGNATURE-

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



Re: script error in program.

2006-01-11 Thread John Meyer

Jon Miller wrote:

Having an error in a script that I cannot figure out why it's not working.  The problem 
is on line 15  "while ($row = mysql_fetch_object" ($result)).
  


What, exactly is the error?

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



Re: working w/UK postcodes

2006-01-09 Thread John Meyer

Mike Blezien wrote:
Yes, after some further research, I found a Perl Modules that handles 
this queit nicely.


thx's

Please tell me where this module is, if you would.

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



Re: Force max query time, or max records returned

2005-12-30 Thread John Meyer
On Friday 30 December 2005 3:31 pm, Scott Baker wrote:

>
> How can I prevent this?
>
> Scott



You know when I deal with users like this, I like to think about what Dennis 
Leary said about spanking children;  "I don't need to spank them, I find that 
waving the gun around works just as well."

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



Re: Need Help Writing a Trigger

2005-12-27 Thread John Meyer
On Tuesday 27 December 2005 2:34 pm, Jesse wrote:
> I'm trying to write a trigger that will update the age of a camper when
> ever a record is updated or inserted.  I have a table named Campers which
> contains basic information about the camper as well as their birthday.  I
> have another table named Config which holds various settings, including the
> date at which camp begins.  The Age field in the Campers table needs to be
> set based on the Config.CampStartDate.  So, I have the following query that
> does what I need:
>

It seems to me that you're storing redundant data.  If you know their 
birthday, than you know their age, just subtract the birthday from today's 
date and you have it.

-- 
Dr. Joseph Dolan: Isn't there a children's book about an elephant named Babar? 
Fletch: I don't know. I don't have any. 
Dr. Joseph Dolan: No children? 
Fletch: No, elephant books.

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



Re: I'm new to mySQL

2005-12-24 Thread John Meyer
On Saturday 24 December 2005 1:05 pm, James Lumb wrote:
> Hi,
> I am new to mySQL and have mac OS X. Please could any other Mac users or
> anyone for that matter tell me the best way of connecting to a mySQL
> database?
> Should I use terminal or a program like PHPmyAdmin?
>
> Cheers,
> James


James,
This is just coming from a person who's used MySQL from the commandline, 
phpMyAdmin, and even from OpenOffice.  There's no one right way to access 
MySQL.  Generally speaking, I use the command line for a multiple correction, 
i.e. if I have to fix a syntax difference on a non-normalized table, or for 
testing.  I use phpMyAdmin for administration purposes (new users and so 
forth), and OpenOffice for actual data entry.  You'll find that is the beauty 
of MySQL.  There are hundreds of ways to access data, and each one has its 
ups and downs.

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



Re: New to MySQL

2005-12-24 Thread John Meyer
On Saturday 24 December 2005 1:05 pm, James Lumb wrote:
> Hi,
> I am new to mySQL and have mac OS X. Please could any other Mac users or
> anyone for that matter tell me the best way of connecting to a mySQL
> database?
> Should I use terminal or a program like PHPmyAdmin?
>
> Cheers,
> James


James,
This is just coming from a person who's used MySQL from the commandline, 
phpMyAdmin, and even from OpenOffice.  There's no one right way to access 
MySQL.  Generally speaking, I use the command line for a multiple correction, 
i.e. if I have to fix a syntax difference on a non-normalized table, or for 
testing.  I use phpMyAdmin for administration purposes (new users and so 
forth), and OpenOffice for actual data entry.  You'll find that is the beauty 
of MySQL.  There are hundreds of ways to access data, and each one has its 
ups and downs.
-- 
This e-mail is virii free, it has been sent from a computer running Linux.

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



OT: Two more Gmail invites

2004-09-23 Thread John Meyer
Just to let people know.  And BTW, you have to say that you want the
account.  Reply off list.
Onlist, I'd like to know how most people back up their Mysql dbs?  XML
or direct SQL file?  I prefer the latter, although I'd like to hear
from proponents of the former.

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



Ot: GMail invites

2004-09-22 Thread John Meyer
Still have GMail invites, for anybody that is interested.  E-mail me.
(reply off list)

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



RE: General questions

2004-08-04 Thread JOHN MEYER


1. What is the user or connection limit for both versions of MySQL 
(Database
Server and MaxDB)?
Search the web site
2. How much memory does MySQL take when started up?
Search the web site
3. Does MySQL take advantage of dual CPU systems?
Search the web site
4. Define referential integrity.
Do a google search

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


Re: Server Startup

2004-06-19 Thread JOHN MEYER
Go into the bin directory and startup winmysqladmin.exe  That will give you a 
graphical control over the server.
  - Original Message - 
  From: Andrew McHorney 
  To: [EMAIL PROTECTED] 
  Sent: Saturday, June 19, 2004 4:20 PM
  Subject: Server Startup


  Hello

  I installed the software. I would like to start up the server but there is 
  no icon. What is the name of the executable so I can make an icon? I am 
  running under Windows.

  Thanks,
  Andrew 



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




Database design question

2004-04-07 Thread JOHN MEYER
Hi,
I'm writing a database for an online candle store.  Here's the situation.  This store 
sells all sorts of items including candles.  Now the gist is that some of the candles 
can be made in different types of waxes and some only have one wax.  My question is 
how do I resolve this when I write up the order and write up the line items.  This 
almost seems like it is going to be some sort of a three way join or something.


Re: I need support

2004-04-05 Thread JOHN MEYER
BTW, when I start Winmysqladmin from a new installation, it always asks me 
for a username and password.  Since this is a single-user machine I simply 
use root and a password.  Does this setup those passwords in MySQL?


From: Egor Egorov <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: I need support
Date: Mon, 05 Apr 2004 11:35:24 +0300
"kim&andy" <[EMAIL PROTECTED]> wrote:
> I can only connect to mysql with the username root and no password I 
have the ini file configured with a username and password but I can't 
connect with them.
> I am using win xp and winmysqladmin ver. 1.4
> I cant genarate a report because it says I must be connected first.
> On the environment tab myodbc window says not found driver 3.51 not 
found.

You must first create user to connect and assign password to the 'root' 
user:
	http://www.mysql.com/doc/en/Adding_users.html
	http://www.mysql.com/doc/en/Windows_post-installation.html





--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
_
Tax headache? MSN Money provides relief with tax tips, tools, IRS forms and 
more! http://moneycentral.msn.com/tax/workshop/welcome.asp

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


Re: need reference for a good book

2004-03-29 Thread JOHN MEYER
Try "MySQL/PHP Database applications" by Jay Greenspan and Brad Bulger.  
It's a great buy and gets into a lot of the practical applications you'll be 
doing a lot of coding for.


At 13:41 3/28/2004, A Mathias wrote:
>Preferably one that is for begginers to medium and thats covers both 
mySQL
>and PHP
>
>Thanks
_
Get tax tips, tools and access to IRS forms – all in one place at MSN Money! 
http://moneycentral.msn.com/tax/home.asp

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


RE: ORDER BY WITH NO PRINT

2004-03-27 Thread JOHN MEYER
This may sound a little bit off, but what programming language are you using 
to "print" this.  It might be easier to simply use a language like perl to 
print out the output that you are suggesting.


From: Seena Blace <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: ORDER BY WITH NO PRINT
Date: Fri, 26 Mar 2004 19:33:44 -0800 (PST)
Hello,
I want to show outpur like this?
Group   hostname   details
aa   abababa
aa   abababababab
aa   anannanananna
bbllololololool
bbssjjsjsjsjjsjsj
Select group,hostname,details from table1 order by group;

I want the output should be like
Group   hostname   details
aa   abababa
      abababababab
      anannanananna
bbllololololool
   ssjjsjsjsjjsjsj


please advice.
thx -seena
_
Get tax tips, tools and access to IRS forms – all in one place at MSN Money! 
http://moneycentral.msn.com/tax/home.asp

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


  1   2   >