Re: fulltext searching
Is there a tutorial or step-by-step introduction to fulltext searches with MySQL somewhere? Regards, Eivind :-o sql, query - 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: fulltext searching
section 6.8 in the manual i think... Hmm, no; that's about the access privilege system... I found it in section 24.2, but I feel this topic has gotten a bit scarce mention in the manual. Perhaps it deserves more than that...? I sure would appreciate something extra :-) Best regards, Eivind sql, query - 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: fulltext searching
plus are you sure you're reading the latest manual? it is chapter 6.8. The location was correct for the onlien manual. I first tried my stored PDf version, since I could not reach http://www.mysql.com There, it was section 24.2. Now I printed then online section 6.8 and will go through it. My intention is to find out whether it would be feasible to try and build full-text search on my website. Thanks for your help! Eivind :-) - 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
Searching through a MySQL-driven website
I run a MySQL/PHP-based website. In an attempt to make some search functionality, I search a few specific tables that I find relevant and look in certain fields when performing a search. A query will generally look something like this: SELECT * FROM Books WHERE LongName LIKE '%$kw%' OR ShortName LIKE '%$kw%' When searching through multiple table groups (i.e. Books, Tapes, Furniture(bogus examples)), search results are simply grouped using php and presented in the sequence they were found. I dont find this to perform adequately as the site grows, especially since I have not been able to implement any response relevance measure with this scheme. I have heard this could be accomplished using some temporary tables with MySQLdoes any body know more about this? I will also appreciate responses with suggestions for good search schemes, particulary good resources on the subject (preferrably available on the web) or any other tips and ideas. Best regards, Eivind PS. thanks for a sometimes very interesting list! ;-) - 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: INSERT to table from text file
I have a server (any server, could be a RADIUS, a DNS or a MTA) that logs to a file in /var/logs/log-file. Is there a way to take the raw data sent to the log file and INSERT it into a table? Can this be done on the fly, meaning, the data isn't stored in the flat text file at all, but rather the service sends the data to the log file and instead of being written to the file, it's sent to a table. If the data is already sent to the logfile and there's no way you can tamper the application/service itself, then I guess you're stuck with that file? Then you have to check the file every now and then and do INSERTs of the data. If, however, you can mess with the code for the service, you could use the C API to do the INSERTs instead of writing it to a log file. Does this sound like a job for Perl/DBI/DBD? Jep. Or PHP. It can be installed for command-line use too, you know... Good luck, Eivind sql, query - 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
mysqladmin status info...
Does anybody know a little more about what the info in mysqladmin 'status' tells about the mysqld? This may sound a little blunt, and maybe I could have found it in the manual somewhere. But still, I would like to get a few pointers on how to interpret information like this: Uptime: 1710735 Threads: 11 Questions: 10649406 Slow queries: 1035 Opens: 20617 Flush tables: 1 Open tables: 64 Queries per second avg: 6.225 Thanks, Eivind :-) sql, query - 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: Undo query in mysql
for MyISAM-Tables use your backup or your replication server, for transactional tables like Inno-DB or BDB you can use ROLLBACK A little stupid digression on my behalf here...: How do you differentiate between transactional and the other type (called...?) of tables you can use with MySQL...? Eivind sql, query - 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: Query
It will be very easy if your records have timestamps (automatically set to the time when the row was created). Then you could just write something like this: SELECT * from yadda where yadda_timestamp NOW(); Or, if resolution by date is enough (timestamp has MMDDHHMMSS), you could try: SELECT * from yadda where TO_DAYS(yadda_timestamp) TO_DAYS(NOW()); Good luck, Eivind query, sql - Original Message - From: Chris Kay [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 4:10 AM Subject: Query I wish to do a query and inside that I wish to grab all records That are before todays date/time Would this work? $now = date(YmdHi) Select * from yadda where 'yadda_year,yadda_month,yadda_day,yadda_hour,yadda_min' = $now -- - Chris Kay Technical Support - Techex Communications Website: www.techex.com.au Email: [EMAIL PROTECTED] Telephone: 1300 88 111 2 - Fax: (02) 9970 5788 Address: Suite 13, 5 Vuko Place, Warriewood, NSW 2102 Platinum Channel Partner of the Year - Request DSL - Broadband for Business -- - - 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 row position
Zac, what is your indicator of which row it is? If you have aprimary key for each row, why don't you just use that? You cant really determine the position of a row if you haven't determined the criteria that fixes the position, right? So, you just decide wether you will sort it alphabetically or according to a row index, then go ahead and do it... If, on the other hand, you mean you want to return the position WITHIN the selection you have gotten, you could just push the records onto an array one by one. Then the array index for each row gives away the position of the row (-1, actually). Example: $rows = array(); $query = select * from blabla; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ array_push($rows, $row); } // - now you have it all in an array variable in php - accessible like this: foreach($rows as $idx = $row) echo $idx:.$row[field_1]. - .$row[field_2]. - .$row[etc].BR\n; ... I'm not sure wether I grasp what your question really is, but perhaps this helped some? Good luck, Eivind :-) - Original Message - From: Zac Hillier [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 9:58 AM Subject: mysql row position Hi I'm looking for a php function that will return the position of the pointer in a mysql recordset. I found mysql_data_seek, but this appears to only move the pointer, I need to get the equivalent row number for the pointer position before moving it, then return to the same position. Can anyone help? Thanks Zac - 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: processlist
If you include the following flag in the startup command, the logfile will be generated in the given location: --log=/var/log/mysqld.log Eivind sql, query - Original Message - From: Ritu Singla [EMAIL PROTECTED] To: Eivind A. Sivertsen [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, June 06, 2002 6:52 AM Subject: Re: processlist Hi, Is this mysqld.log file created automatically or we need to do some settings in my.cnf to enable this logging of mysqld? Thanx in advance.. Ritu - 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: How to get data from MySQL with perl
Here's an example: - #! /usr/bin/perl use Mysql; $dbh = Mysql-connect(localhost, verycooldatabase, , ); $query = select this from that; $sth = $dbh-query($query); // returns one row at the time in array @arr while(@arr = $sth-fetchrow) { foreach $data (@arr) print($data\n); } - Good luck! Eivind sql, query - 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: processlist
You can also tail -f the logfile of mysqld... tail -f /var/log/mysqld.log ...or something like that... Eivind sql, query - 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: Is it possible to have MySQL perform an action at a specifictime?
Hummm..one solution is just to exploit the 'at' program of unix/linux systems... I use that for backups, table dumps etc. combined with perl or php scripts... $0.02; Eivind sql, query - 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
MySQL query efficiency - JOINs
I have a question regarding the efficiency of an explicit JOIN statement vs. an implicit one. What I mean: I have a many-to-many mapping through a mapping table. I.e. I have different types of tools mapped to several categories in which they might belong. For instance, a complete programming suite may be categorized both as a debugger, a C-compiler and an assembler... This programming tool is mapped to all these 3 categories through a table just coupling the id's against each other... If the ID of the programming tool itself is 134, the entries for this tool in the mapping table will be like this: +++ | ToolID | TypeID | +++ |134 | 24 | |134 | 19 | |134 | 17 | +++ Now I wonder, when extracting all the info for a certain tool from the database, will it actually be more efficient to use the explicit JOIN statement rather than just tie the keys to one another in the query? This may seem very basic to some; but my formal database knowledge IS very basic. Please, if you can shed some light on the topic or give me som epointers to a good reference; you are very welcome to do so! Best regards, Eivind :-) sql, query - 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