OT: Reply-Adress in this list
I use some mail-lists for mysql, php and security with Outlook Express. When I reply, some lists set their list-adress automatically, some the adress of the person originally posting. The second version may not so good IMHO, because I think so many replies are not going to the lists. mysql++ and mysql do not automatically reply to the list mysql-de does. I think the a big Problem with the first solution are some autoresponders which may spamming mainling lists. I'm not a freak in mailservers, but maybe others know if there's a better configuration. Maybe I can configure my Outlook Express better? -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Duplicate entries
Sorry, but justs a quick remark on the top: Have you looked at small and KAPITAL letters? -- Franz Alt [EMAIL PROTECTED] at work I run mysql 3.23.45. on a windows2000 machine with apache 1.3.23 and php4.06. at home it's Linux SuSe *.0, mysql 4.03 apache 1.3.26 and php4.2.3. the problem is I'm having problems inserting data into temporary tables. the results are different running the same script. here is the script (It's semi long so please bear with me). $CreateTempTable=mysql_query(Create temporary table Tmp (maintId int unique, deptId varchar(30), exhibitId VARCHAR(30), datefinished date, progressId VARCHAR(33), reset int(1))); //create temp table for all occurrences during dates specified mysql_query(INSERT into Tmp SELECT maintId, deptId, exhibitId, datefinished, progressId, reset from maintenance where DateReported='$firstdate' and DateReported='$lastdate'); // insert into temporary table date reported data mysql_query(INSERT into Tmp SELECT maintId, deptId, exhibitId, datefinished, progressId, reset from maintenance where DateFinished='$firstdate' and DateFinished='$lastdate'); // insert into temporary table date finished data mysql_query(INSERT INTO Tmp SELECT maintId, deptId, exhibitId, datefinished, progressId, reset from maintenance where DateReported='$firstdate' and DateFinished='-00-00'); //insert into temporary table unfinished and previously started data mysql_query(INSERT into Tmp SELECT maintId, deptId, exhibitId, datefinished, progressId, reset from maintenance where DateReported='$firstdate' and DateFinished='$lastdate'); // insert into temporary table finished and previously started data mysql_query(UPDATE Tmp set progressid='in progress' where DateFinished'$lastdate'); //change database to show what was completed by lastdate mysql_query(alter table Tmp add complete tinyint default 0); //added to be able to sum() complete mysql_query(alter table Tmp add InProgress tinyint default 0); // added to be able to sum() InProgress mysql_query(Alter table Tmp add parts tinyint default 0); //added to be able to sum() parts mysql_query(ALTER TABLE Tmp add deferred tinyint default 0); //added to be able to sum() deferred mysql_query(UPDATE Tmp set complete='1' where progressId='complete'); //changed to be able to sum()complete mysql_query(UPDATE Tmp set InProgress='1' where progressId='in progress'); //changed to be able to sum()InProgress mysql_query(UPDATE Tmp set parts='1' where progressId='waiting for parts'); //changed to be able to sum()Waiting for parts mysql_query(UPDATE Tmp set deferred='1' where progressId='deferred'); //changed to be able to sum() deferred $row=mysql_query(SELECT dept.name, count(Tmp.deptId), sum(complete), sum(InProgress), sum(parts), sum(deferred), sum(reset)/sum(complete) * 100, sum(reset)/$days_result from Tmp, dept where Tmp.deptId=dept.deptid Group by dept.deptId order by dept.name); // selecting departments by groups if ($row==0) die(mysql_error()); $totals=mysql_query(SELECT COUNT(deptId),sum(complete), sum(InProgress),sum(parts),sum(deferred), sum(reset)/sum(complete) * 100 ,sum(Tmp.reset)/$days_result from Tmp); any thoughts on the duplicates? this gives runs fine on mysql 3.2.53 but stops at duplivcate entries on 4.03. John Coder - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL as a desktop DB
I think MySQL will be more faster in Desktop environment and if you are adverse to using the text based interface to MySQL then you can try out some GUI avaiable in the market. The best I know are MySQL-Front and SQLyog but since MySQL-Front has been discontinued you can try SQLyog at http://www.webyog.com/sqlyog Have you ever tried OpenOffice as a Frontend for our mySQL? Would be a powerfull Opensource-Team! -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Tryout mysql++ Example Loading binary file in a BLOB ... ... to be continued in msql++ list !?
I think I'll start this thread in mysql++ list again. Sorry, I might was to tired yesterday... - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Store pictures in DB
Can I use MySQL to store pictures as part of a record? You CAN. Should I just try to store the name of the picture? Yes. If you have FTP Access or similiar, I would prefere this! Some remarks from the manual : -- Insert a File located locally on MySQL-Serverinto a blob-column INSERT INTO media_binaerdaten (Daten) values(load_file(c:/tmp/test.zip); -- get length of blob-fields SELECT Key,length(Daten) FROM `media_binaerdaten` WHERE 1 SELECT Daten FROM `media_binaerdaten` WHERE FKMedia_ID=47 INTO OUTFILE C:/tmp/test.zip - get data WITH escapes, can be insertet again SELECT Daten FROM `media_binaerdaten` WHERE FKMedia_ID=47 INTO DUMPFILE C:/tmp/test.zip - get raw data (WITHout) escapes, can be used as binary, e.g. *.zip or *.exe Escaping --- If you want to insert binary data into a BLOB column, the following characters must be represented by escape sequences: NUL ASCII 0. You should represent this by `\0' (a backslash and an ASCII `0' character). \ ASCII 92, backslash. Represent this by `\\'. ' ASCII 39, single quote. Represent this by `\''. ASCII 34, double quote. Represent this by `\'. If you write C code, you can use the C API function mysql_escape_string () to escape characters for the INSERT statement. See section 22.3 C API function overview. In Perl, you can use the quote method of the DBI package to convert special characters to the proper escape sequences. See section 22.5.2 The DBI interface. You should use an escape function on any string that might contain any of the special characters listed above! greetings by a busted by blobs-coder ! -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Store pictures in DB
+1 For medical imaging, at least in radiology (PACS), you usually see the terabytes of images being stored on a NAS somewhere, and the database itself is actually pretty small just pointing to filenames of where the pictures are located. This keeps the database small and fast, and lets you add storage without the complication of using Logical Volume Management since you don't need to extend your filesystem to add space. Just add a completely new block of space and start writing your images out to it, storing the location in a field in your DB. On Tuesday, September 24, 2002, at 08:46 AM, Salada, Duncan wrote: You can store pictures in a BLOB field, but it is generally recommended that you simply store the filename of the picture. I'm not shure, but is there a feature in oracle, which stores something like BLOBS internally as files? Is something like that planed in MySQL? -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: granting does not give the correct privileges
Is this an error in Mysql? I do the follwing command from a shell grant insert on mydb.* to username@localhost identified by user 'pwd'; When I check the permissions the insert_priv field on user table of mysql db is set to 'N'. Why is that? I can change the privileges by giving an update command. I did't understand exactly, but here a mistake I made: What plattform? Are you using WinmySQLAdmin? - look section [WinMySQLadmin] -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Tryout mysql++ Example Loading binary file in a BLOB ...
I wanted to test the mysql++ example Loading binary file in a BLOB ... because I'm looking for for a solution to load several MB up to a remote DB, without FTP or things like that. Just 1 thread in DB, so performance should be no problem. Therefor I try to execute and benchmark this quite famous Code from the online-manual, but I've got some Problems (P) and Questions (Q). I'm using Visual C++ 6 on an Windows98 , 526MHz and 320MB Ram. I can compile in debug and release-Version. No errors, just warnings like, I try to translate: \include\type_info1.hh(39) : warning C4800: 'int' : Variable wird auf booleschen Wert ('True' oder 'False') gesetzt Integer set to boolean value true or false \include\convert1.hh(40) : warning C4273: 'strtol' : Inkonsistente DLL-Bindung. dllexport angenommen. assumed inconsistent dll-binding for dllexport \include\sql_query1.hh(135) : warning C4355: this' : wird in Initialisierungslisten fuer Basisklasse verwendet -this is used in init-lists for derived classses \load_file.cpp(5) : warning C4273: '_errno' : Inkonsistente DLL-Bindung. dllexport angenommen. assumed inconsistent dll-binding Q1: Can I do something against this warnings? Q2: or are they taking any affect? Then something curious: I can execute the code in Release-Mode and it runs with no runtime error ( but the result is wrong , see below). P1: When I run in in debug-Mode, I get an SQL-Syntax-Error 1064 Q3: Where can I find error-codes in the online-manual? Q4: I'm not shure if std::string fill(read_buffer,blen);I included std::string P2:Unfortunally, the result ist not ok, since the escape manipulator doesn't seem to do anything at all. P3: I tried to fix the code for my VisualC++ compiler by inserting #include string iostream , using namespace std; or adding std:: for debug-mode. Then I get (often, not always) an Exception in line: std::string tmp_str = strbuf.str(); release binary seems to be unchanged ... This is a sample output of 2 runnings. file aaa contains now data to escape, but abs does. both are ascii files. // - OUTPUT 1st C:\Bauinfo\Projekt_MySQL\mmd_source\Konsolentest\mysql_blob_load\Releasel abc release: loading ... abc load data file: 0s Length:20 kBytes/second: 1.#INF // the cout of the whole query INSERT INTO blobs (blob_data) VALUES(abc / 1 ' 2 3\ ) Error: You have an error in your SQL syntax near '3\ )' at line 1 1064 2nd C:\Bauinfo\Projekt_MySQL\mmd_source\Konsolentest\mysql_blob_load\Releasel aaa release: loading ... aaa load data file: 0s Length:28 kBytes/second: 1.#INF INSERT INTO blobs (blob_data) VALUES(aaa bbb !§$%() 123 x-_ ) INSERT in MySQL: 0s Length:28 kBytes/second: 1.#INF // END OF OUTPUT P3) Uploaded Binary files cause no SQL-error, but are cut at the first '\0'. therefore only some bytes are stored in BLOB (messured via phpmyadmin, SELECT length(blob_data) ... Has anybody compiled and tried out the original example? now a last, my lightly changed code: -- #include windows.h #include sys/stat.h #include fstream #include sqlplus.hh extern int errno; #include iostream #include string // Für Zeittests #define _PERFORMANCE #include time.h #include cstdlib #include vector #include algorithm #include conio.h using namespace std; const char MY_HOST[]=localhost; const char MY_USER[]=franz; const char MY_PASSWORD[]=fff123; const char MY_DATABASE[]=blobtest; const char MY_TABLE[]=blobs; const char MY_FIELD[]=blob_data; // BLOB field int main(int argc, char *argv[]) { #ifdef _DEBUG // compiled for debugging std::string datei = aaa; cout debug: loading ... datei endl; // argc=2; #endif #ifndef _DEBUG // compiled for release std::string datei = argv[1]; if (argc 2) { cerr Usage : load_file full_file_path endl endl; return -1; } cout release: loading ... datei endl; #endif Connection con(use_exceptions); try { con.real_connect (MY_DATABASE,MY_HOST,MY_USER,MY_PASSWORD,3306,(int)0,60,NULL); Query query = con.query(); std::ostrstream strbuf; std::ifstream In (datei.c_str(),ios::in | ios::binary); struct stat for_len; if ((In.rdbuf())-is_open()) { if (stat (datei.c_str(),for_len) == -1) return -1; unsigned int blen = for_len.st_size; if (!blen) return -1; #ifdef _PERFORMANCE // Performance Test clock_t Start, End; double Elapsed; Start = clock(); #endif char *read_buffer = new char[blen]; In.read(read_buffer,blen); std::string fill(read_buffer,blen); #ifdef _PERFORMANCE End = clock(); Elapsed = static_castdouble ( End - Start ) / CLOCKS_PER_SEC ; cout \load data file:\ Elapsed s endl; cout Length: blen endl; cout Bytes/second: blen / Elapsed endl; // 2nd Performance Test Start = clock(); #endif strbuf INSERT INTO MY_TABLE ( MY_FIELD ) VALUES(\ escape fill \); std::string tmp_str = strbuf.str(); // to have variable in debugger available int l = tmp_str.length(); cout endl