RE: PHP Search + MySQL Query

2003-08-30 Thread csebe
Did you ORed or ANDed the LIKE clauses? Please provide the combined statement that didn't return results, the one with more than one LIKE clauses. Lian Sebe, M.Sc. Freelance Analyst-Programmer www.programEz.net > -Original Message- > From: Brown, Chris [mailto:[EMAIL PROTECTED] > Sent: S

RE: Scripts with arguments

2003-08-29 Thread csebe
If it's going to be a simple batch file then use %1, %2, ... inside the script to get the parameters passed to it. Or better install & use a real scripting language like perl. ;-) Lian Sebe, M.Sc. Freelance Analyst-Programmer www.programEz.net > -Original Message- > From: Enrique Andreu

RE: Message

2003-08-14 Thread csebe
It's a perl DBI question not a MySQL one but anyways... $sth is just a statement handle and if you print it it gives you a hash ref, so is not an error. After preparing you should do an execute on the statement than fetch the results. Better, use a prepare-execute-fetch all-in-one command like:

RE: GRANT command question

2003-07-28 Thread csebe
Hi there, If you go to the MySQL manual (chapter 4.3.1) you'll see that GRANT ALL... does not include the granting of privileges to others. So you must use something like: GRANT ALL [...] WITH GRANT OPTION; The manual has also downloadable versions. Lian Sebe, M.Sc. Freelance Analyst-Programmer

RE: Design decision

2003-07-28 Thread csebe
Lin, thanks for your input. Indeed I forgot to mention there is a many-to-many relation between users and groups. I'm inclined though to use Solution 3. My main concern with 2 and 3 was not to exceed the column allocated space for the concatenated string, when it grows with the number of users in

RE: rights to create table, select, then drop table..

2003-07-28 Thread csebe
Hi there, I tested your setup and wors fine for me. I issued this commands as mysql's root: grant usage on *.* to [EMAIL PROTECTED] identified by 'nelu'; grant select,insert,update,create,drop on test.* to nelu@'%'; Then I logged in as nelu with: mysql -u nelu -p test create table test1 (id in

RE: mysql queries with numbers

2003-07-28 Thread csebe
Do it in MySQL if you can. "Use the force" ;-) Besides MIN() and MAX() there are also statistical functions implemented as: AVG(), STDDEV() etc. See the manual for all functions. Lian Sebe, M.Sc. Freelance Analyst-Programmer www.programEz.net > -Original Message- > From: Taylor Lewick [

Design decision

2003-07-28 Thread csebe
Hi everyone, Just wanted your expert opinion on the following: I'm implementing an authorization system with user/group permissions stored in a database. I have a Users table and a Group table, identical in structure: mysql> desc users; mysql> desc groups; +---+-+ | Field | Type

RE: access denied

2003-07-17 Thread csebe
What's user are you logged with when you're trying these commands? It looks like you specified no user when launching the mysql console. Try with user root if you have access to it. You don't have enough rights to perform your commands without a user specified. Lian Sebe, M.Sc. Freelance Analyst-P

RE: Delete user/no access to mysql db

2003-07-07 Thread csebe
The REVOKE command should do most of the job for you, which is removing the privileges for a specific user. See the manual for more. However, the user remains defined in the "user" table (while having no privileges), until one with access, deletes him/her manually. HTH, Lian > -Original Mess

RE: Problem using TEMPORARY TABLE

2003-07-03 Thread csebe
It's probably a matter of granting CREATE TEMPORARY TABLE privilege for the "hardware" user. HTH, Lian > -Original Message- > From: Andrey Mishenin [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 03, 2003 8:26 PM > To: [EMAIL PROTECTED] > Subject: Problem using TEMPORARY TABLE > > > > I'

RE: perl error when execute mysqlaccess

2003-06-27 Thread csebe
This more a perl question. You need to install CGI.pm for perl. The CGI module should be available from RPMs. HTH, Lian > -Original Message- > From: Iago Sineiro [mailto:[EMAIL PROTECTED] > Sent: Friday, June 27, 2003 1:32 PM > To: MySql Mail List > Subject: perl error when execute mysq

RE: incorrect SUM() results

2003-06-27 Thread csebe
Hi all, > -Original Message- > From: Victoria Reznichenko [mailto:[EMAIL PROTECTED] > Sent: Friday, June 27, 2003 3:18 PM > To: [EMAIL PROTECTED] > Subject: Re: incorrect SUM() results > > > Shaun Callender <[EMAIL PROTECTED]> wrote: > > > > I'm using mySQL 4.0 trying to solve what I think

RE: user privileges question

2003-06-26 Thread csebe
> -Original Message- > From: Paul DuBois [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 26, 2003 1:26 AM > To: michael young; [EMAIL PROTECTED] > Subject: Re: user privileges question > > > At 18:02 -0400 6/25/03, michael young wrote: > >Hi, > > I am creating a small web based progr

RE: MySQL 4.0.13 GRANT syntax

2003-06-25 Thread csebe
update is a reserved word in MySQL. Choose another username. Lian Sebe Freelance Analyst-Programmer www.programEz.net > -Original Message- > From: Adam Lawrence [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 25, 2003 5:10 PM > To: [EMAIL PROTECTED] > Subject: MySQL 4.0.13 GRANT syntax

RE: Problem setting/activating password

2003-06-25 Thread csebe
What about using the username only instead of username@"%" ? According to manual (section 7.34) it should be identic in behaviour: [...] The simple form user is a synonym for user@"%". [...] Does it do the same? Lian P.S. Andy, sorry for posting by mistake to you. ;-| > -Original Message-

RE: Problem setting/activating password

2003-06-25 Thread csebe
I don't know if this apply when using GRANT but have you tried afterwards: > flush privileges; HTH, Lian > -Original Message- > From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 25, 2003 9:19 AM > To: [EMAIL PROTECTED] > Subject: Problem setting/activating passwo

RE: Getting the unique auto-increment primary key after an insert

2003-06-23 Thread csebe
As stated only few days ago on this list, the LAST_INSERT_ID() is relevant per connection, i.e. it returns the correct last inserted id of the current connection, disregarding other possible inserts done through other parallel connections. So each connection has its own counter for this. HTH, Lian

RE: Getting the unique auto-increment primary key after an insert

2003-06-23 Thread csebe
The good ol' LAST_INSERT_ID() function is what you probably need. Check it out in manual. Lian > -Original Message- > From: Matt Hyne [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 24, 2003 5:58 AM > To: [EMAIL PROTECTED] > Subject: Getting the unique auto-increment primary key after an

RE: Textfile to a 2 column mysql database

2003-06-23 Thread csebe
To pinpoint the solution here it is an one liner ;-) perl -n -e 'chomp; print "INSERT INTO YourTable (question,answer) VALUES (\"$tmp\",\"$_\");\n" if ($|--); $tmp=$_' test.txt > test.sql It's a "hybrid" perl solution which requires feeding in MySQL afterwards and it disregards special characters

RE: reinstall mysql

2003-06-22 Thread csebe
Please specify OS, and previous install type (package, rpm, dist, compiled, etc.) And by the way, when/why you do "make distclean" during the new install? Lian > -Original Message- > From: saad al-hajeri [mailto:[EMAIL PROTECTED] > Sent: Sunday, June 22, 2003 11:34 AM > To: [EMAIL PROTEC

RE: Can we crypt passwords on MySQL

2003-06-18 Thread csebe
So it's a future thing since I can see MySQL is only at 4.0.13 now. Anyway, I do prefer (hopefully there are others too ;) inserting directly into user, db, host,... tables instead of using GRANT, so for this case I (still) can use PASSWORD(), right ?! BTW, maybe I'm missing something but what cou

RE: Can we crypt passwords on MySQL

2003-06-18 Thread csebe
Strange... This is what the online manual says in "4.3.7 Setting up passwords": >>> Passwords must be encrypted when they are inserted in the user table, so the INSERT statement should have been specified like this instead: mysql> INSERT INTO user (Host,User,Password) -> VALUES('%','jeff

RE: Can we crypt passwords on MySQL

2003-06-18 Thread csebe
There is a PASSWORD('your_clear_text_password_here') function you can use wherever you define a new password. See the manual for more. Lian > -Original Message- > From: Grégoire Dubois [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 19, 2003 12:55 AM > Cc: 'Mysql' > Subject: Can we cryp