Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by gemini

  1. Thank you very much David! The magic worked! This is cool - I learned something today - thanks a lot, now I have better understanding of it I had to use \n instead of \r\n - thanks to you I know why Thank you, thank you, thank you MySQL doc is quite compicated for a newby like me.
  2. Thank you David. I changed it to \n, but still no difference. I actually have txt tab delimited file as it stated in the LOAD DATA line. I tried using full path in the phpMyAdmin with different options and couldn't import data either - only fom my hdd
  3. Thank you for pointing me into right direction. I still have problems - here is my code: ><?php $dbh=mysql_connect ("localhost", "xxx", "xxx") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("some_db"); $sql1 = "TRUNCATE TABLE sometable"; $sql2 = "LOAD DATA INFILE '/home/my_host/public_html/folder/test.txt' INTO TABLE sometable FIELDS TERMINATED BY '\\t' LINES TERMINATED BY '\\r\\n' IGNORE 1 LINES"; mysql_query($sql1) or die ('I can not empty the 4closures table.'); mysql_query($sql2) or die ('I can not insert data into 4closures table.'); e
  4. I was using strandard import tools available in phpMyAdmin
  5. Hello everyone, I have a csv file that being uploaded to my site every morning and I need to import it into existing table - update the data. I'm not a PHP wiz, but I'm sure I could find a script that I can adjust to my needs and make it work, but I would like to ask if there is easier way do that. I know I can import the data manually, so I was wandering if I can use the same tools by setting up cron job and without any additional scripting? Any suggestions? Thank you.
  6. It looks like you entered the time arguments as part of the command line (made obvious by the fact it's trying to run '7' as a command). Assuming you are using cPanel's cron form to enter your crontab info, the actual command should be "/usr/local/bin/php /home/ibsteam/fullbackup.php" and you should use the other form fields available to enter the five scheduling components (i.e., if you used the Advanced cron form, you'll see 5 fields before the command line field. Enter the 5 items in "7 13 * * *" in each of those fields respectively). <{POST_SNAPBACK}> Thank you Mike!
  7. the last one was 7 13 * * * /usr/local/bin/php /home/ibsteam/fullbackup.php the number 30 in the message I figured stands for the minutes in the cron job. The las message was: /bin/sh: line 1: 7: command not found
  8. I'm trying to back stuff up on my local PC and getting the following email from cron: /bin/sh: line 1: 30: command not found what is it? and how do I fix it - any ideas? Thank you!
  9. thanks I figured it I had to delete exe part on the <FilesMatch>
  10. http://www.ibsteam.net/ibs_links/beta5/setup.exe it had permission 755 already I renamed it now I just saw this in my .htaccess # deny most common except .php <FilesMatch "\.(inc|tpl|h|ihtml|sql|ini|conf|class|bin|spd|theme|module|exe)$"> deny from all </FilesMatch> and when I disable it - my *.exe files download just fine - how can I edit this code to add sertain folder with files to be accepted for downloads?
  11. http://www.ibsteam.net/IBS%20Links/beta5/
  12. I uploaded a few *.exe files but can not download them from the webpage by clicking on the link to the files. It says You don't have permission to access the file. I already CHMODed it to 755 still doesn't work P.S. I just saw this in my .htaccess # deny most common except .php <FilesMatch "\.(inc|tpl|h|ihtml|sql|ini|conf|class|bin|spd|theme|module|exe)$"> deny from all </FilesMatch> and when I disable it - my *.exe files download just fine - how can I edit this code to add sertain folder with files to be accepted for downloads?
  13. Hello everybody. This is probably a lame question, but I don't know the answer: I'm using INCLUDE function in my pages and sometimes including pages from subfolders which makes pictures disappear form the header. When I look at the properties I can see that its trying to read the file from the folder where the included page is - of course I always can provide a full path with the domain name for each picture, but I think there is other way to do it right. Is there a way to include pathes somewhere that I just could use something like /images/aaaa.jpg and not entering *****/images/aaaaa.jp
  14. Sorry I didn't reply right away, thread tracking works kinda strange.. Thank you for suggestions.
  15. Hi Jack, click on the link that I posted with the script and you'll get the idea if what I was asking. In the subcategory query I set a constant that referres to the 1st subcategory. But I what I'm trying to do, instead the constatnt in the query I need variavle that picks up from choosing of category in the first combo box. It still remain a problem for me. Thanks
  16. The code actually works in I put constatns instead of variables.
  17. Hi everybody. Have another question: I'm trying to use a combobox with JumpMenu on change. For example its easy if you use just a combobox and submit button then you just do "post" and you can obtain your variable from the combobox as $_POST[variable]. But I'm trying to have two comboboxes with jump menu that i could choose a category in one and subcategories would appear in another one. I'm putting value in the JumpMnue as "index.php?category_id=$qcrow[id]" and it works - I can see that url path changes depending on your choice in the combobox, but I cant figure how to get that variable
  18. Okay. This is was the problem: I had a column named "check" - php has such command that's why it was a problem. I renamed the column and it fixed the problem. Thanks.
  19. The script actually works. I tryed like you Surefire said. And finally I put back all the variavles back except for "check" one. and it let me to make chamges on alll the foelds back and forth. I put "check" column back - and it's the same error. The error show that check column gets the data but it referres to SQL syntax error. Well, i'm thinking maybe I need to use another name for the column ensted of "check" - maybe there is a PHP command like that. I'll try that later - right now I can't log in into my cpanel office - have no idea what's wrong with that. Anyway the script is working,
  20. Hello everybody, I stuck with UPDATE function. Script to edit/update links that are being exchanged with another websites. Here is the coding of two scripts: 1-script Actual link modification form 2-script Updating record in the links table. looks%20like%20stuck%20with%20the%20checkbox.%20Here%20is%20the%20error%20that%20I%20get: For%20experiments%20please%20choose%20Real%20Estate%20category,%20then%20South%20Caroline%20subcategory%20and%20then%20you%20may%20play%20with%20the%20first%20link%20in%20that%20category.%20The%20website%20is%20actually%20just%20opened%20
  21. Well, here is http://maxgrad.net/links/links.php now everything opens in the same window with the same design. I had to include the header.php and the footer.php in the actual script. At the beginning I was including the script (as a main content) into the template and every time i click on any link it would open in a new window without header and footer. Looks like this is the way to do it - every time include header and footer in a script that makes your content.
  22. Here is the error Here is the HTML you were asking for http://www.maxgrad.net/index_.html I actually made the same as you were describing before at http://maxgrad.net/inc/
  23. I made the TCH folder. As for the links I don't have any yet. The only one that I wanted to work is a script at http://maxgrad.net/links/links.php Actually I found the same sample posted by you on May 19th in another thread. So I did exactly as you showed, but if I try to include /links/links.php in the same manner that you showed with header.php & footer.php - it give's me an error message for but it works with I don't really understand the error.
  24. Thanks Surefire. Here is the HTML http://www.maxgrad.net/index_.html The this too, this is how it looks at the beginning, but when you click on any category it opens on a blank page http://www.maxgrad.net/default.php Do you need actual script of links.php? Thank you
  • Create New...