Re: Output from select is not what expected

2001-04-18 Thread Ben Dimmock
Hi, It seems like you are not "joining" the tables in any way. Say you have: Table1 --- record1_id = 1 --- record2_id = 2 Table2 --- record1_id = 3 --- record2_id = 4 Table3 --- record1_id = 5 --- record2_id = 6 If you do a select all, you get all permutations: 1, 3, 5 1, 3, 6 1, 4, 5 1, 4, 6

Re: How to structure a random query

2001-04-18 Thread Ben Dimmock
You could also do something like: select field1, field2 from table order by rand() limit 1; HTH Ben - Original Message - From: "Philip Mak" [EMAIL PROTECTED] To: "Alec Smith" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, April 18, 2001 11:50 PM Subject: Re: How to structure

Re: Mysql and Perl DBI

2001-04-11 Thread Ben Dimmock
Gordon, What kind of errors? A copy/paste of errors would be useful. Cheers Ben - Original Message - From: Gordon Stewart [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 11, 2001 1:29 PM Subject: Mysql and Perl DBI I am running Redhat 7 and mysql and I have tried

RE: wildcard character in sql grant statement

2001-04-09 Thread Ben Dimmock
Hey Scott, Try: GRANT ALL ON DATA.* TO user1@"%" IDENTIFIED BY "password" /or simply/ GRANT ALL ON DATA.* TO user1 IDENTIFIED BY "password" Not specifying a domain defaults to %. HTH Ben -Original Message- From: Scott Meesseman [mailto:[EMAIL PROTECTED]] Sent: 09 April 2001 01:27 To:

RE: Disappearing \

2001-04-09 Thread Ben Dimmock
Without being picky, and just to let Jack know, the line: "\\\server\\folder" should be: "server\\folder" Each double slash pair (\\) is replaced in the database with one slash (\). I recommend you take a look at the AddSlashes() and ereg_replace() functions if you're using PHP

RE: How update 1 of two identical rows.

2001-04-09 Thread Ben Dimmock
delete from db where date="2001-04-09" and CR_amount=300.00 insert into from db (date, DB_amount, CR_amount) values ("2001-04-09", NULL, 300.00); insert into from db (date, DB_amount, CR_amount) values ("2001-04-09", NULL, 350.00); would change the 3rd to 350.00 credit. Unfortunately, there is

GRANT permissions

2001-04-08 Thread Ben Dimmock
I'm confused, and wondering if anyone can help me. I'm running 2 virtual servers, let's say server1.domain.com and server2.domain.com. These virtual servers sit on servers named host1.isp.com and host2.isp.com respectively (I hope I haven't lost anyone yet). I have a perl script, that lists the

RE: character set works via web but not at command line?

2001-04-08 Thread Ben Dimmock
Ian, I may be way off the mark here, but I've found MySQL usually starts quoting the line from the place at which the error occurred, thus indicating it didn't like the "insert" part. Not being able to see the preceding lines I can only suggest it may not have an active database to write to.