RE: Count (*) function results needed in echo statement
-Original Message- From: Stitchin' [mailto:[EMAIL PROTECTED] Subject: Count (*) function results needed in echo statement I've got the following code in my php file: /* Select all categories from designcatagories table */ $query = SELECT designcatagories.catcode, designcatagories.catdesc, count(*) FROM designs,designcatagories where designs.catcode = designcatagories.catcode GROUP BY catcode; $result = mysql_query($query) or die (Couldn't execute query.); Hi Renee, The easiest way to reference the output of mysql's functions in a meaningful way inside php would be to use 'as field_name', so for example if you changed your query to.. $query = SELECT designcatagories.catcode, designcatagories.catdesc, count(*) as thiscount FROM designs,designcatagories where designs.catcode = designcatagories.catcode GROUP BY catcode; ..you could then simply reference the result of count() as thiscount in the same way as you print catdesc, catcode et al currently. HTH, William. I tested it in phpMyAdmin and I'm getting the correct results here's my dilemma ... I want to spit out a list of my catcodes, # designs found, catdesc and I'm not sure how to reference the count(*) object??? What I have below doesn't work, it just prints the () and I can't find any reference to this in my books??? HELP!!! echo b$catcode/b/font /td td$count()/td td$catdesc/td /tr; Renee Toth Stitchin' Up A Storm www.stitchinupastorm.com - 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: Reposting: Connecting a web server to a db server
-Original Message- From: Nestor [mailto:[EMAIL PROTECTED]] Sent: 08 October 2002 16:01 To: [EMAIL PROTECTED] Subject: Reposting: Connecting a web server to a db server snip Any ideas? Have you reloaded the mysql server? Try this at the shell... mysqladmin -u root -p reload That may fix your problem (mysql needs to be reloaded after you make username/password/grant changes) - 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: storing PDF files in mysql ?????
Toby, If I understand correctly you want to perform two distinct actions: 1. Convert Microsoft Office Word .doc files into .pdf 2. Store those pdf's in MySQL. You should look into (via google.com) some doc to pdf converters. An example is this com object: http://www.convertzone.com/doc2pdfcom/help.htm#HowtoBuy, it costs $219 and converts .doc to .pdf. If you can convert the .doc's into .html files, you might be able to get away with using Adobe's free email converter service. Email the HTML document to [EMAIL PROTECTED], wait an hour or so, and you'll find a pdf version in your inbox. (There's also a [EMAIL PROTECTED] address if you dont want to use html, but I think you wanted to keep formatting). Once you have the document in PDF, it's a relatively trivial action to store the documents in your MySQL database. HTH, William. -Original Message- From: kayamboo [mailto:[EMAIL PROTECTED]] Sent: 08 October 2002 18:20 To: toby z Cc: list mysql Subject: Re: storing PDF files in mysql ? I think if you decide to store in the blob, whatever it is, a pdf or jpeg or bmp, it is going to be in binary format. While you need to display it back, just convert them back to whatever format you like. Else there is always the choice of just storing the path in your database. By the way, which language you are using to write your applications. If it is delphi, I can send you some sample code regards - Original Message - From: "toby z" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, October 09, 2002 1:14 AM Subject: Re: storing PDF files in mysql ? thnx rich but u see the problem iz my clients want their text IN pdf format to be displayed with all these colors on the page in other words they want their sites layout to be maintained on the pages showing this pdf text as they are pretty concerned bout security so what do i do now thnx a mill toby From: "R.Dobson" [EMAIL PROTECTED] To: toby gibbson [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: storing PDF files in mysql ? Date: Tue, 08 Oct 2002 16:35:56 +0100 hi, 2 ways to do this: a) don't store the file actually in the db but store the path to it. b)use the function LOAD_FILE(filename) to get the contents of a file as a string value and store as a blob. decide which to use depending on how many pics you have cheers Rich toby gibbson wrote: ok guyz more trouble now im supposed to convert all the text (from ms word) to PDF and put the pdf files in mysql db now i ve really got myslf stuck havent i can anyone plz hlp thnx a million stuck az usual toby . _ Chat with friends online, try MSN Messenger: http://messenger.msn.com - 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 -- Richard Dobson Database Administrator MRC Bright Study Clinical Pharmacolgy St Bartholomew's and the Royal London School of Medicine and Dentistry Charterhouse Square London EC1M 6BQ Tel: 020-7882-5670 Mob: 07711-522926 Fax: 020-7882-5672 [EMAIL PROTECTED] _ Send and receive Hotmail on your mobile device: http://mobile.msn.com - 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 - 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: Question Regarding Update Year statement
Hi!, From: W [mailto:[EMAIL PROTECTED]] Sent: 04 October 2002 15:11 To: [EMAIL PROTECTED] Subject: Question Regarding Update Year statement I'm looking for a date function that will allow me to update only the year portion of a field to a particular year, in this case, 2002. I've tried UPDATE [table] SET YEAR([field]) = '2002' WHERE [field] 2002 but this gives me an error. The MySQL documentation only seems to cover using SELECT with the YEAR function. What is the correct syntax for doing this? You might have more luck with something like this... UPDATE [table] SET [field] = DATE_FORMAT([field],'2002-%m-%d') WHERE YEAR([field]) 2002; Of course I might be wrong, but it should work... HTH, William. - 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: Archive of this mysql list
Ahem, have a look at the bottom of any post to the list: Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) :) HTH, William. -Original Message- From: Chris Becker [mailto:[EMAIL PROTECTED]] Sent: 03 October 2002 16:43 To: [EMAIL PROTECTED] Subject: Archive of this mysql list Is there an archive of all posts to this mysql list that I can search somewhere? Chris Becker MCDBA MCSE http://www.PrismSoftware.com [EMAIL PROTECTED] sql - 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: Reply-to munging
I don't by the less functionality argument any more than if you have a good emailer. I think I have a good emailer, and on the munging lists, I press Reply-All, it will also send to the original author, but 95% of the case I want the list, and original author doesn't want two replies. PS, this has nothing to do with SQL or QUERIES ... :) My opinion on this is that if I have a question, and I've exhausted the archive, and google, and my reference manuals, and my magic 8-ball, then I'm more than happy to get a duplicate answer - even though it's the exact same answer. Plus, sometimes I send people I'm helping via a list more information to their private address. Just because one person want's a 3mb attachment doesn't mean everyone on the list want's it. My 2 cents... William. - 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: SPAM *** Audit feature in MySQL ***
Try http://www.mysql.com/doc/en/Query_log.html -Original Message- From: Imro Benito STROK [mailto:[EMAIL PROTECTED]] Sent: 23 September 2002 20:04 To: '[EMAIL PROTECTED]' Cc: '[EMAIL PROTECTED]'; Imro Benito STROK Subject: SPAM *** Audit feature in MySQL *** Hi All, Due to security reasons we have to implement an audit functionality in our MySQL production databases. Q; Is there an audit feature in MySQL. If YES can someone send me the information how to implement this. Thanks, Imro Strok StarHub Pte Ltd Information Technology Phone: +65 6825 5703 Email : [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 - 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: WG: ABUSE? , myisampack , sql , admin [T2002091901XL]
It's also possible someone subscribed abuse@verizon to the mySQL mailing list I think. Perhaps someone has a grudge against verizon. -Original Message- From: Joel Rees [mailto:[EMAIL PROTECTED]] Sent: 19 September 2002 18:07 To: Franz, Fa. PostDirekt MA Cc: [EMAIL PROTECTED] Subject: Re: WG: ABUSE? , myisampack , sql , admin [T2002091901XL] ... i received this message , after sending a request to mysql-mailing-list: Thank you for bringing this matter to our attention. We are sorry for any inconvenience it has caused you. ... It wasn't my intention to abuse , offend or spam anyone or anything and i think i didn't do something like that at all. You didn't. No need to worry. They were thanking you (us? the list?) for reporting someone who was. If i did , i am very sorry about it , but I'd like to know : What went wrong? Good question. I also received that response, but hadn't recalled submitting any abuse reports to them in the past month, so I was wondering what was going on, too. I think maybe the automatic machinery they use to filter the abuse complaints thought someone's abuse report was coming from the list for some reason. (You should look at the headers you get from some people. It's easy to understand how a machine could get confused.) -- Joel Rees [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 - 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: LOAD DATA LOCAL INFILE not allowed this version?
One can disable all LOAD DATA LOCAL commands in the MySQL server by starting mysqld with --local-infile=0. In the case that LOAD DATA LOCAL INFILE is disabled in the server or the client, you will get the error message (1148): The used command is not allowed with this MySQL version http://www.mysql.com/doc/en/LOAD_DATA_LOCAL.html -Original Message- From: Uriel Wittenberg [mailto:[EMAIL PROTECTED]] Sent: 08 September 2002 16:24 To: [EMAIL PROTECTED] Subject: LOAD DATA LOCAL INFILE not allowed this version? The command LOAD DATA LOCAL INFILE C:\\MO10.txt INTO TABLE stud1 fields terminated by / lines terminated by '\r\n'; produces: ERROR 1148 at line 1: The used command is not allowed with this MySQL vers Could someone explain why?? I'm running version MYSQL Ver 11.18 Distrib 3.23.51, for Win95/Win98 (i32) under WinXP Home standalone (i.e., no network, just one machine). I used to do this routinely under Win Me. Thanks in advance, Uriel - 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: Just being prudent - upgrade MySql v3.23 to v4.0.2
Please see http://www.mysql.com/downloads/mysql-4.0.html, specifically the link for You can find how to upgrade from MySQL 3.23 Here (http://www.mysql.com/doc/en/Upgrading-from-3.23.html) ... In general what you have to do when upgrading to 4.0 from an earlier MySQL version: Run the mysql_fix_privilege_tables to add new privileges and features to the MySQL privilege tables. Edit any MySQL startup scripts or configure files to not use any of the deprecated options listed below. Convert your old ISAM files to MyISAM files with the command: mysql_convert_table_format database. Note that this should only be run if all tables in the given database is ISAM or MyISAM tables. If this is not the case you should run ALTER TABLE table_name TYPE=MyISAM on all ISAM tables. Ensure that you don't have any MySQL clients that uses shared libraries (like the perl Msql-Mysql-modules). If you have, you should recompile them as structures used in `libmysqlclient.so' have changed. ... HTH, Dw. -Original Message- From: Chuck Amadi [mailto:[EMAIL PROTECTED]] Sent: 02 September 2002 08:02 To: [EMAIL PROTECTED] Subject: Just being prudent - upgrade MySql v3.23 to v4.0.2 Still haven't recieved a simple answer when i unzip the mysql-4.0.2-alpha-win.zip Do i simply extract into C:\mysql Folder and override everthing . as i have working db's so i just would like confirmation prior to proceeding. The MySql Doc's don't clarify this I assume you do but i thought i'll remain prudent. Plz confirm ASAP as I have another MySql Project that'll conbine Transactions (Innodb) Table TimeStamp datatype field for all the Project Tables . -- Regards Chuck Amadi ICT Dept Systems Programmer Rhaglenydd Systemau Adran ICT - 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