Jump to content

Conjurer

Members
  • Posts

    107
  • Joined

  • Last visited

    Never

Everything posted by Conjurer

  1. I am running version 4.0.12.NT on a Win XP Pro OS. I am trying to work through the MySQL book by DuBois. When I try to run a load command I get an error. From the mysql prompt I entered: LOAD DATA LOCAL INFILE \'member.txt\' INTO TABLE member; What I get is: Error 1148: The used command is not allowed with this MySQL version. Why is Load Data command not working? How can I fix this? I should add that if I go to command prompt and use mysqlimport --local sampdb member.txt that works. The file loads. :roll:
  2. I am getting an error that the load data local infile is not allowed with this version of MySqL From what I can tell it is a 4.0 version so I can\'t figure out what is wrong. I am running the MySQL and the data on my local hard drive. Can anyone point me in the right direction here? How do I get it to work to import a csv data file? thanks! :?:
  3. How can I update the autonum file when I am loading data from a csv text file? I have Field 2, Field 3, Field 4, etc. in my text file. In the table Field 1 is set up as an autonum Primary key. When I tell it to load the data file using columns 2 - 4 it loads the rows but leaves the first field blank. What would I need to add to the syntax to have it also populate the primary key with the autonum values? :roll:
  4. I have been trying to find a PDF version of the MySQL 4.1 reference manual that would include bookmarks to help make the navigation a little more manageable. Not having any luck on this. Does anyone know a source? Thanks! :roll:
  5. I think it is the keys that are messing me up. I deleted them, was able to upload the data. Now I will work on rebuilding the keys. Thanks for help.
  6. I am totally lost on this and have been spinning my wheels all day. I have a table. I have a data file with 1145 records. I want to load the data into the table. I have tried creating a small test with just 6 records in it. It is a csv file. When I try to load it into the table it says it loaded 6 records but only one is in there. Any clues what I am doing wrong? :? A couple things I am wondering about is whether my Primary Key or any of the other keys would goof me up. Also the data I am loading is only the first dozen fields the others are not be used. I used a list of columns with comma separation to tell it which fields. Here is a sample of the text file data I am trying to load: 1,Maryann,Johnson,Clinical Contact,\"Billing Solutions, Etc, Inc\",\"2850 Southwest Cedar Hills Boulevard, Pmb 64\",,,River City,OR,97501,,503-644-8931,503-646-8931,,,,,2k1D15 2,Stephanie,Olhausen,Clinical Contact,\"Paul Puziss, M.D.\",3800 SW CEDAR HILLS BLVD,,,River City,OR,97501,SUITE #250-WESTGATE PLAZA,503-646-8931,503-644-8931,503-526-8931,,,,2c2u82 3,Kenny,Goerig,Optical Director,Sunset Eye Clinic,\"1865 NW 169 Place, Suite 105\",,,River City,OR,97501,,(503) 533-8931,(503) 533-8931,,,xyz@xyz.com,www.xyz.com,2d3N57 4,Jacob,Janecek,Optometric Physician,Sunset Eye Clinic,\"1865 NW 169 Place, Suite 105\",,,River City,OR,97501,,(503) 533-8931,(503) 533-8931,,,xyz@xyz.com,www.xyz.com,2k4p84 5,Samuel,Lee,Optometric Physician,Sunset Eye Clinic,\"1865 NW 169 Place, Suite 105\",,,River City,OR,97501,,(503) 533-8931,(503) 533-8931,,,xyz@xyz.com,www.sunseteyeclinic.com,2E5z6 Here is a dump of the table: # phpMyAdmin SQL Dump # version 2.5.2 # http://www.phpmyadmin.net # # Host: localhost # Generation Time: Oct 27, 2003 at 05:39 PM # Server version: 4.0.15 # PHP Version: 4.2.3 # # Database : `immedia_Contacts` # # -------------------------------------------------------- # # Table structure for table `Marketing` # # Creation: Oct 27, 2003 at 04:46 PM # Last update: Oct 27, 2003 at 04:51 PM # CREATE TABLE `Marketing` ( `Userid` int(25) NOT NULL auto_increment, `First_Name` varchar(25) NOT NULL default \'\', `Last_Name` varchar(25) NOT NULL default \'\', `Title` varchar(25) NOT NULL default \'\', `Company` varchar(40) NOT NULL default \'\', `Address_Line_1` varchar(60) NOT NULL default \'\', `Address_Line_2` varchar(60) NOT NULL default \'\', `Address_Line_3` varchar(60) NOT NULL default \'\', `City` varchar(25) NOT NULL default \'\', `State` char(2) NOT NULL default \'\', `Zip_Code` varchar(10) NOT NULL default \'\', `2nd_Address` varchar(60) NOT NULL default \'\', `Phone` varchar(25) NOT NULL default \'\', `Fax` varchar(25) NOT NULL default \'\', `Phone_1` varchar(25) NOT NULL default \'\', `Phone_2` varchar(25) NOT NULL default \'\', `Email` varchar(25) NOT NULL default \'\', `Web_Page` varchar(25) NOT NULL default \'\', `Confirmation_Code` varchar(25) NOT NULL default \'\', `Prd_Imaging` set(\'Y\',\'N\') NOT NULL default \'N\', `Prd_EMR` set(\'Y\',\'N\') NOT NULL default \'N\', `Prd_Appt_Schd` set(\'Y\',\'N\') NOT NULL default \'N\', `Prd_Billing` set(\'Y\',\'N\') NOT NULL default \'N\', `Prd_AR_Finan` set(\'Y\',\'N\') NOT NULL default \'N\', `Prd_Docuscan` set(\'Y\',\'N\') NOT NULL default \'N\', `Demo_Will_Attnd` set(\'Y\',\'N\') NOT NULL default \'N\', `Contact_Has_Questions` set(\'Y\',\'N\') NOT NULL default \'N\', `Contact_Prsnl_Info` text NOT NULL, `Username` varchar(25) NOT NULL default \'\', `Password` varchar(255) NOT NULL default \'\', `User_Level` enum(\'0\',\'1\',\'2\',\'3\') NOT NULL default \'0\', `Signup_Date` datetime NOT NULL default \'0000-00-00 00:00:00\', `Last_Login` datetime NOT NULL default \'0000-00-00 00:00:00\', `Activated` enum(\'0\',\'1\') NOT NULL default \'0\', PRIMARY KEY (`Userid`), UNIQUE KEY `Email` (`Email`), UNIQUE KEY `Username` (`Username`), KEY `Names` (`Last_Name`,`First_Name`), KEY `Company` (`Company`), KEY `Confirmation_Code` (`Confirmation_Code`) ) TYPE=MyISAM COMMENT=\'Master List of Immedia Prospects\' AUTO_INCREMENT=8 ; # # Dumping data for table `Marketing` # INSERT INTO `Marketing` (`Userid`, `First_Name`, `Last_Name`, `Title`, `Company`, `Address_Line_1`, `Address_Line_2`, `Address_Line_3`, `City`, `State`, `Zip_Code`, `2nd_Address`, `Phone`, `Fax`, `Phone_1`, `Phone_2`, `Email`, `Web_Page`, `Confirmation_Code`, `Prd_Imaging`, `Prd_EMR`, `Prd_Appt_Schd`, `Prd_Billing`, `Prd_AR_Finan`, `Prd_Docuscan`, `Demo_Will_Attnd`, `Contact_Has_Questions`, `Contact_Prsnl_Info`, `Username`, `Password`, `User_Level`, `Signup_Date`, `Last_Login`, `Activated`) VALUES (7, \'Charles\', \'Mcbride\', \'\', \'\', \'12370 S.W. First Street\', \'\', \'\', \'Beaverton\', \'OR\', \'97005\', \'\', \'(503) 644-3614\', \'\', \'\', \'\', \'\', \'\', \'2s7n60r\', \'N\', \'N\', \'N\', \'N\', \'N\', \'N\', \'N\', \'N\', \'\', \'\', \'\', \'0\', \'0000-00-00 00:00:00\', \'0000-00-00 00:00:00\', \'0\');
  7. I finally got the \"set\" type to work. I had to put the default value in without a qoute around it, then it took. Thanks for your help. :wink:
  8. I am going to have a registration form that contains some required fields and some optional fields. When I create the table to hold these values I know the required fields should be set to Not Null. What is the common practice on the optional fields -- do you set them to Null or do you set them to Not Null and put a blank space \' \' in the default value? Thanks for your help.
  9. I am trying to set up a table using PHP Admin at my webhost. The tutorial I was looking at used a db.sql file that contained the following: first_name varchar(25) NOT NULL default \'\', last_name varchar(25) NOT NULL default \'\', email_address varchar(25) NOT NULL default \'\', So in phpAdmin I set up the Field Type and Length okay and left the one field set to \"Not Null\". I am confused though about what to do in the Default column. Do I just leave it blank? Or do I need to literally type \' \' with the quotes and all? Also what are the other attributes binary and unsigned for? And when would you use the extra column other than for autoincrementing?
  10. I\'ve used a number of databases going back as far as Rbase; but I am new to MySQL and was just trying to create some fields in a table that would be set to either yes or no. I tried using a type of \"set\" and I got an error back. Do I use \"enum\" instead? Or just text with a size of 1?
  11. This is definitly a newbie question, but you gotta start somewhere. I have worked with a lot of SQL all the way back to Rbase so I am not new to the database design and know the syntax. Problem is I have always been the sole user of those databases and have never had to deal with someone else connecting to it. I am working through the PHP Freak\'s Membership tutorial. In the db.php file that you include you set up the variables to run the connection to the data base. I set my initial trial up using the following: $dbhost = \'localhost\'; $dbusername = \'root\'; $dbpasswd = \'xyz213\'; $database_name = \'freaksmembers\'; So my question is when I end up setting this up on a real website how should I change this so they don\'t log into the root? Assuming the website is at www.mydomain.com do I just set up a generic user for connecting ike \"Webentry\" assign a password like abc123 and then change the db.php include variables to: $dbhost = \'www.mydomain.com \'; $dbusername = \'Webentry\'; $dbpasswd = \'abc123\'; $database_name = \'freaksmembers\'; Would appreciate any suggestions that will help me take this over to the my webhost\'s site. I am especially concerned that I don\'t set myself up for a security problem. Thanks
  12. Client is asking me to hook him up to a system where a customer can log in and then submit and/or view the status of support requests. I know there must be something out there in PHP, MySQL. Can anyone here point me to something that you have worked with?
×
×
  • 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.