multiple PRI indexes
is it generally recommended / a good idea to have more than one PRI index in the same table? i've never seen that before until today while trying to track down bugs in someone else's system and noticed a table with 2 PRI indexes. will this cause any problems? tia. ~shawn - 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
try using "SHOW FIELDS FROM TABLE LIKE EXPR", where 'TABLE' is the name of the name of the table, and 'EXPR' is an expression indicating what you wish to match. for example, to get the information about a column called 'ckey' in table 'config', you would do: "SHOW FIELDS FROM CONFIG LIKE 'CKEY'". hope this helps. ~shawn On Mon, 13 Aug 2001, Matthew Marcus wrote: > > Hello, > > Having trawled through the documentation for a while I'm none the wiser - > is there any way of retrieving the data type of a single column using > MySQL? Any suggestions would be most appreciated. > > Thanks, > > Matthew Marcus > > - > 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: New member question
there are a number of ways you could accomplish this. depending on how large the database is, you may want to try exporting it to csv (comma separated value) format, and then importing it into mysql, using either the "load" command, or a third-party utility like phpmyadmin (which is what i generally use for tasks like that). another way is if you are indeed using php and you have odbc support compiled in... you could simply read from the access database and simultaneously write it to a new mysql table. that's what i could think of offhand..someone else out there might have a better solution or three. =) ~shawn On Sat, 4 Aug 2001, RCA Webmaster wrote: > > I have just subscribed to this list, so forgive me if my question has been > answered many times before but I was not sure where else to find this > information. > > I am new to mysql and am going to be using it on a website that I maintain. > My question is, is there a program/utility or easy way to convert an MS > Access database to mysql format? > > Thanks, > > Chris > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.265 / Virus Database: 137 - Release Date: 7/18/01 > > > - > 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: Select
just out of curiousity, was there a particular advantage to you using varchar as opposed to date for the column type? because if so it would be a lot easier to manipulate that date.. you could calculate differences in dates, get portions of the date, and all sorts of other nice things if it were a date column... ~shawn On Thu, 2 Aug 2001, Augusto Cesar Castoldi wrote: > HelpHi. > > I have a colun in my table for the birthday.: "DD/MM/". It's varchar. > > In PHP, I can get the month of date, bu substr($date, 3, 2). (MM) > > Can I do a select with %LIKE% but saying the position of the varchar I want to find? > > thanks. > > Augusto > - 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: Linking a Form
mark, you need to actually write the code somehow in frontpage. i've not dealt w/ frontpage in a LONG time (mainly cos i can't stand it, but that's personal opinion so i'll refrain from commenting) ... but i believe there is a way you can write raw html or php code in there somewhere. that part you'll have to figure out on your own. :) the actual php code you'll need really isn't that difficult, something like this usually works for me: $link = mysql_connect("hostname.com", "username, "password"); $query = "select * from table where field='blah'"; $result = mysql_db_query("database", $query, $link); while($row = mysql_fetch_assoc($result)) { print "The value of 'address' is: " . $row["address"]; } mysql_close($link); that's just a rough example, but basically what it does, is: connect to the database; execute a query, storing the result of the query in the $result variable; create an array called $row containing the contents of the query; and loop through that array record by record, printing the value of the "address" field. i hope that example was clear enough, i'm not the best at explaining things sometimes. if you need more information on mysql and php, you can find it at the following url: http://www.php.net/manual/en/ref.mysql.php hope this helps! ~shawn On Thu, 2 Aug 2001, Mark A. Perez wrote: > Hello, > > I am creating a web based table that when users request or want > information they list the information in a form. This works great but > the problem I am having is that I cannot link MySQL table with the form. > I am using FrontPage 2000 and the only tables that it wants to create > are result tables in *.mdb or Microsoft Access. These tables cannot be > imported or exported to my web. And, I have found no actual means of > connecting my PHP database to my form. Can someone explain what it is I > am not doing correctly. I have been using databases for many years now, > but I am at a loss with PHP. > > This is greatly appreciated. > > Best Regards, > > Mark A. Perez > President and CEO > MP International > > > - > 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: what is Decode
from http://www.mysql.com/doc/M/i/Miscellaneous_functions.html: DECODE(crypt_str,pass_str) Descrypts the encrypted string crypt_str using pass_str as the password. crypt_str should be a string returned from ENCODE(). hope this helps. ~shawn On Wed, 1 Aug 2001, saraswathy saras wrote: > hai > > Do anybody knows what is DECODE using mysql and what is the purpose using > it. > > Thanks in advance. > > > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > > - > 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: reindexing tables
i've tried simply re-creating the index as you suggested ... no luck. here's a brief summary of my situation: i developed an application on one server, after it was developed and ready to go live we started to move it to another server. after moving it i noticed my search function wasn't working... i fiddled around with the database quite a bit, with no luck. then i realized that the search function wasn't working on the development server either, and it had been working fine all along. that's what makes no sense to me at all. :( output from myisamchk on the development server is as follows: *** Checking MyISAM file: inventory Data records: 2 Deleted blocks: 5 myisamchk: warning: 1 clients is using or hasn't closed the table properly - check file-size - check key delete-chain - check record delete-chain - check index reference - check data record references index: 1 - check data record references index: 2 - check data record references index: 3 - check data record references index: 4 - check data record references index: 5 - check data record references index: 6 - check data record references index: 7 - check data record references index: 8 - check data record references index: 9 - check data record references index: 10 - check data record references index: 11 - check data record references index: 12 - check record links MyISAM-table 'inventory' is usable but should be fixed *** i'm not real familiar with myisamchk so i'm not sure exactly what i need to do to repair this table, since it said it should be fixed. i also still have no clue why this search suddenly stopped working. =/ frustrated, ~shawn On Mon, 30 Jul 2001, Werner Stuerenburg wrote: > What about issueing first drop index, then add index? Should do > the job. Or repair table. What does check table or myisamchk say? > > shawn reed schrieb am Montag, 30. Juli 2001, 07:44:15: > > > hi all, > > > i apologize for the utterly newbie-ish question, but i've yet to find an > > answer to it after having spent quite some time searching mysql's web site > > (especially since half the links i click on now seem to be giving me 404 > > errors...) > > > how does one reindex a table containing fulltext indexes? the reason i > > ask this is... a table that i had set up w/ fulltext indexes suddenly > > returns no rows when i perform a search on it... and it used to work just > > fine. everything i have read seems to be telling me to reindex the > > table.. and quite frankly that's the only thing i can think of doing since > > nothing else has changed that should be causing the searches to no longer > > function properly. > > > any help would be appreciated. > > > ~shawn > > > > - > > 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
reindexing tables
hi all, i apologize for the utterly newbie-ish question, but i've yet to find an answer to it after having spent quite some time searching mysql's web site (especially since half the links i click on now seem to be giving me 404 errors...) how does one reindex a table containing fulltext indexes? the reason i ask this is... a table that i had set up w/ fulltext indexes suddenly returns no rows when i perform a search on it... and it used to work just fine. everything i have read seems to be telling me to reindex the table.. and quite frankly that's the only thing i can think of doing since nothing else has changed that should be causing the searches to no longer function properly. any help would be appreciated. ~shawn - 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