Jump to content

mgm_03

Members
  • Posts

    49
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling
  • Location
    Fort Worth, TX

mgm_03's Achievements

Member

Member (2/5)

0

Reputation

  1. Don't know if I am the only one who stores code snippets in DWMX, but I'd like to export them (or at least retrieve the folders in which they're stored). I'm on Mac OS X but I wouldn't mind hearing from Windows users as well. TIA...
  2. I\'m tryin to upload a text file into PMA but when I choose a file from my computer and select the various options for uploading and Submit, it returns \"You should select file which you want to insert\" (good grammar) No matter what options I change, it just doesn\'t want to recognize the file (it\'s a csv file of zip code, latitude, longitude) 70,000 rows. Any ideas ?? I\'m on MacOSX Jaguar.
  3. I appreciate the help and would be willing to offer a donation if you have Paypal. Alot of people on this board are very generous with their expertise but this particular solution solves a huge puzzle for me. My database directory is for finding machine shops. In addition to offering many services, they also work with many types of materials. So, again, I have a situation of Cats (metals)(plastics)(etc) and Subcats(steel, copper, brass, etc.) ( ) ( ) It appears to be an identical table setup as we just reviewed. To retrieve all the Services and Materials a company offers, my initial thought is to concatenate both query statements with an \'AND\'. Or, just have 2 distinct queries. Thanks, Mark P.S. -------------------- If you can write a script that can remove G.Bush from the White House, you\'d be doing Planet Earth a huge favor!!!
  4. hey man! thanks...I would\'ve never thought to do this in a jillion years. I can\'t honestly say I understand it (being a dumbass noobie and all) but I\'ll read up on MySQL to understand the relations you defined in the query. I don\'t suppose this query would also accomodate situations in which a category has no subcategory at all? I wonder if in those instances, I could just make a table for a category and subcategory with one entry in each table. thanks again!!
  5. In my application, there will be a few hundred different service categories and in some cases, sub-categories. Since any company can offer one or more services and sub-cats, logically, this means a many to many relationship with a mapping table. However, I would like to maintain a separate table for each category because the idea of having, say, 300 categories and subcats all in one mapping table just feels like the wrong way to do it. If I want to retrieve all the services company A offers, How do I write a SELECT statement that iterates through every service category table checking for the presence of company A\'s unique ID? Any advice is appreciated !!
  6. so if there are 69.1 miles between lat lines, then 10 miles = .1447 degrees. if my zipcode is lat1, lon1 then, I find zip codes whose lat/lon falls in the range: lat1-.1447 to lat1+.1447, lon1-.1447 to lon+.1447 yes? i realize this is an approximation that doesn\'t consider the curvature of the earth....but i couldn\'t get that formula to work and now, i don\'t care. decent primer worth reading http://distance-calculation.com/Distance-C...Calculation.asp
  7. actually, since I am using PMA, there is no script...just using the \"insert data from text file\" option and selecting the options as appropriate on PMA. ...anyway, I got it to work....I imported the text file into Excel and deleted the last 2 columns of the text file. This data has nothing to do with the zip code calculations and deleting it out reduces the file size. Also, I deleted the first column which simply had a 2digit code for each state 01 AL , 02 AR, 03 AZ, etc. I inserted a blank space in that first column and did a \"fill-down\" to all rows in that colum. This is needed because that first field becomes the auto-incrementing primary key. Saved it as a Macintosh CSV. so now, i can start scripting distances and watch my CPU usage skyrocket from all the trigometric calculations *ugh*
  8. Has anyone tried to implement a zip code search where a user selects a radius of say 10miles and companies with zip codes in that geographic circle are inlcuded in the query result? I have the script that converts latitude/longitude to miles and I have the text file of 55,000 (+or-) zip codes in the U.S. when inserting the text file into phpMyAdmin, the query says 55000 rows inserted but when I try to browse the zip code table, there are only 51 rows available. Interestingly, I get one row per state and it is always the last zip code in that state....it seems PMA disregards all rows except the last for each state. anyway, if you\'ve tried this tactic and were successful...lemme know!!! Thx.
  9. Thanks for replying. Just retrieving: Company, address, city, state, area code, phone I\'m thinking there probably won\'t be more than a few hundred companies whose names all start with the same letter so...probably database is the way to go.
  10. My application will involve potentially hundreds or thousands of companies. On one webpage I want to have alphabetical links that correspond to companies whose name starts with a certain letter. When the user clicks a letter, all the companies in that letter category are returned... (all hyperlinks ->) A B C D E ...X Y Z It seems to me, querying the database on each click might be inefficient if the info is relatively static. Would it make better sense to do the query periodically to keep it up to date? Then store the query results in a text file which is retrieved and ouputted when the user clicks a letter.
  11. Hey man, Thanks! I had a feeling that strpos() was the function I needed but I had not implemented any code yet. Thanks for the code snippet, too. ...i\'ve got so much coding to do. fwiw...i found a good tutorial that simulates Google query results: http://zend.com/zend/tut//tutorial-brogdon2.php cheers.
  12. I\'ve implemented FULLTEXT searching along with the score and it works great. If a user enters a keyword, the list of companies who match that keyword are returned. Is it possible to display the context in which the keyword was found? \"Our shop can do make prototypes from any kind of plastic\" Assuming the keyword searched was \"prototypes\", how could I get this sentence or (fragment of it) to be returned from the query? I guess this is like a real search engine. Any ideas? Thanks!
  13. thanks for replying. i read a few tutorials on FULLTEXT and went ahead with implementing it. it works fine (unusual for me) so I don\'t think I\'m going to try LIKE. adios.
  14. My table has a column for members to enter a text description up to a few hundred characters. I want a visitor to search that column using keywords entered into an HTML form. ...just read a tutorial at www.onlamp.com about MySQL FULLTEXT searching...seems very powerful. Question: Would you use that or just insert a LIKE clause in your query? Thanks!
  15. thanks....I went to my php.ini file and found this: ; - display_errors = Off [security] ; With this directive set to off, errors that occur during the execution of ; scripts will no longer be displayed as a part of the script output, and thus, ; will no longer be exposed to remote users. With some errors, the error message ; content may expose information about your script, web server, or database ; server that may be exploitable for hacking. Production sites should have this ; directive set to off. I am guessing that I need to change Off to On, uncomment the line and re-start Apache....yes?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.