C API - Mysql 5

2006-10-25 Thread Vincent . Badier
an idea? Thank's in advance Vincent Badier -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

SQL subqueries and JOIN conditions

2006-09-04 Thread Vincent . Badier
And i'd like to obtain the final resultset : id col1col2col3col4 1 a b NULLNULL 2 c d aa bb 3 e f cc dd 6 NULLNULLee ff Vincent Badier

Re: Combo of 2 fields needs to be unique

2006-09-04 Thread Vincent . Badier
Hello Brian, IMHO if you put this combinaison as a uniq key, any insert with this combinaison already existing will fail Vincent Brian Dunning [EMAIL PROTECTED] 04/09/2006 16:49 To: mysql@lists.mysql.com cc: Subject:Combo of 2 fields needs to be

UNION pb with NULL

2005-04-05 Thread Vincent . Badier
Hello all, Following my previous mail about FULL OUTER JOIN, i tried to deal with UNION but i get some weird problems. I've created two temporary table, here their content : mysql select * from T3; +-+-+--+ | ver_ref | server | ver_real |

UNION pb with NULL

2005-04-05 Thread Vincent . Badier
Hello all, Following my previous mail about FULL OUTER JOIN, i tried to deal with UNION but i get some weird problems. I've created two temporary table, here their content : mysql select * from T3; +-+-+--+ | ver_ref | server | ver_real |

FULL OUTER JOIN

2005-04-04 Thread Vincent . Badier
Hello all, mysql 4.0.20 I'd like to know how one can do a full outer join. I've read some workaround with a UNION, but i need the join only on a few columns, while UNION will make double tuple if one column is not the same. I also would like to avoid temporary table if possible, since the

Query with group by

2004-09-16 Thread Vincent . Badier
Hello all, i'm trying to built a query that report me the latest tuple for a given field. I explain myself a bit. Let's say i have a table such this : +++-+--+-+ | id | date | content | location | version |

Re: Problem with tables;

2004-09-16 Thread Vincent . Badier
CREATE TABLE spamdata ( id bigint(20) NOT NULL, dates varchar(60) NOT NULL, probe varchar(100) NOT NULL, ip varchar(15) NOT NULL, fqdnvarchar(100) NOT NULL, reason varchar(100) NOT NULL, portvarchar(2) NOT NULL, code

Re: Query with group by

2004-09-16 Thread Vincent . Badier
Which version of MySQL are you running? I'm having trouble thinking of a solution that doesn't involve a subquery but subqueries aren't supported until version 4.1.x; I don't want to give you a subquery if you can't run it. Rhino I'm running 3.23.43. -- Vincent -- MySQL General Mailing

grant privileges problem

2004-07-19 Thread Vincent . Badier
Trying to setup a new user for replication purpose, here what i got : Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2566 to server version: 4.0.20-standard grant REPLICATION SLAVE on forum.* to repl@'%' IDENTIFIED BY 'replforum'; ERROR 1221: Wrong usage

Re: grant privileges problem

2004-07-19 Thread Vincent . Badier
Sorry, grant REPLICATION SLAVE on forum to repltest2@'%' IDENTIFIED BY 'replforum'; ERROR 1144: Illegal GRANT/REVOKE command. Please consult the manual which privileges can be used. (using 4.20) Regard's Vincent You were attempting to

[3.23.43] left join limitation?

2004-05-18 Thread Vincent . Badier
Hello all, Using two tables : R1 : id data R2 : id pid type data R2.pid reference R1.id I would like to have a result set that is all the rows from R1 which are not referenced by any row from R2, but all this only for a certain type (R2.type) I've done this : SELECT R1.* from R1 left join

Re: [3.23.43] left join limitation?

2004-05-18 Thread Vincent . Badier
SELECT R1.* from R1 left join R2 on (R1.id=R2.pid) where R2.id is NULL; The problem of such a statement is that the result set show me all the rows from R1 which does not have ANY references in R2, and i would like to have all rows from R1, which does not have any rows of a certain type in

Re: [3.23.43] left join limitation?

2004-05-18 Thread Vincent . Badier
SELECT R1.* from R1 left join R2 on (R1.id=R2.pid) where R2.id is NULL; What i need is to have a result that list only the R1 rows which does not have any references of type D. Aha, you have more than one record in R2 which is linked to R1. Hmmm.. you can select the pid's from R2 which do

sql question

2004-03-23 Thread Vincent . Badier
Hello all, I've a table like this : site_1 pkg_name_1 version site_1 pkg_name_2 version site_1 pkg_name_3 version ... site_1 pkg_name_n version site_2 pkg_name_1 version site_2 pkg_name_2 version ... site_2 pkg_name_n version ... site_n pkg_name_1 version ... site_n pkg_name_n

C mysql functino problem

2003-09-19 Thread Vincent . Badier
Hello, I tried to code a (very) small program under windows, this is my first with C mysql functions : #include stdio.h #include mysql.h int main(void) { MYSQL *mysrv = NULL; mysrv = mysql_init(mystruct); if ( mysrv == NULL ) { perror(Struct initialize failed\n); exit (-1); }

C API

2003-06-04 Thread Vincent . Badier
Hello, I'm trying to code a small C client, under windows, with bloddshed Dev-C++, and i always get an error. /* Code */ #include conio.h #include stdarg.h #include winsock.h #include stdio.h #include stdlib.h #include string.h #include mysql.h int main(void) { MYSQL* toto; toto =

Re: C API

2003-06-04 Thread Vincent . Badier
#include conio.h #include stdarg.h #include winsock.h #include stdio.h #include stdlib.h #include string.h #include mysql.h int main(void) { MYSQL* toto; toto = mysql_init(toto); } /* this is the compler log */ Compiler: Default compiler Executing gcc.exe... gcc.exe U:\mep\Dev\abr.c

recover databases

2002-12-26 Thread Vincent . Badier
Sorry to post again, i've simply forgot to give some details : mysql show databases; +--+ | Database +--+ | mysql | test +--+ 2 rows in set (0.00 sec) However, i still have databases files present on the system : syst@datasrv:/var/mysql$ ls -al total 40 drwxr-xr-x8

recover databases.

2002-12-24 Thread Vincent . Badier
Hello all, I'm quite newbie with MySql, so i apologize if this is a trivial question. I did a small database, but fortunately not yet in production. This Week-End happened a power cut and I didn't made any backup of my databases :( When i restarted Mysql, i could not log in as any user i