Jump to content

asongisabeautifullie

Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.cephas.info

Profile Information

  • Gender
    Not Telling
  • Location
    London

asongisabeautifullie's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. The main problem with what I\'ve tried so far is that LOAD DATA INFILE will only open a file in the database\'s data folder in the mysql folder. I tested to see where the uploaded file goes, and it was something like C:PHPuploadtempphp8.tmp While I\'m doing this on my own local server I know I could use this code to move the file to the database directory: if (is_uploaded_file($bulk)) { move_uploaded_file($bulk, \"C:MySQLdatabooksbulk.txt\"); } But I can\'t do this on my web host cos I wouldn\'t have permission...
  2. As part of an administrator\'s page for a site I want to include an option to upload a text file for bulk loading into the database. I was thinking that I could do this with a form, where the POSTed file would have name=\"bulk\". The path to the uploaded file will then be $bulk. I would then run an sql query loading data from this file into the table. So far I\'ve failed miserably at making this happen, if anyone has any clever ideas please post your script suggestions. Cheers!
  3. Thanks a lot, that was really helpful I have another question though about performance. I\'m using PHP and MySQL to search a catalog of around 2000 books by author, title and publisher. Firstly, is searching 3 attributes (all varchar) with this many rows going to be really slow? Secondly, the way I\'ve written my script at the moment the query is run every time a new page of results is displayed, so if there are 3 pages of results the query will be run 3 times even though the result set is the same, just starting further down the rows. Is there any way to get around this, or is this generally how all multiple results pages work? Thanks again
  4. Hey I\'ve pretty much just started using MySQL, and having installed it for my local server (Windows 2000 with IIS) and set the password for the root user I still find I can connect to my MySQL server without giving either a username or a password. This means I can run SQL statements in my PHP pages without specifying a connection to MySQL. What do I do to ensure a password is needed to connect to the MySQL server? Thanks, much appreciated Adam
×
×
  • 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.