Jump to content

mameha

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mameha's Achievements

Member

Member (2/5)

0

Reputation

  1. I have a table of data that should be updated every 3 hours by a new set of data. I put the new data into a new table, and now I want to compare the two tables to find what data has been updated. For example: OLD TABLE id | height | width 123 | 55 | 80 NEW TABLE id | height | width 123 | 65 | 80 As you can see, height has been updated to 65. Is there some query that can (1) find all rows that have been updated and (2) tell me which column was updated?
  2. I have a load of data, most of it looks OK but sometimes there are 'funny' characters in there which are causing problems. 1) For example when I import data to MySQL from the .sql file, the following character "・" seems to cause mysql to stop importing the field at that point (so all data in the field after that character is lost). I think that character is supposed to be a double quote, but due to encoding has been changed. 2) There are some japanese characters in the text, which surely were not input by the user. For example "GT痴 ". I think somehow the old system input them like that, or adding them when exporting to me. How can I get ride of those bad characters?
  3. fixed with: $i=0; while ($i<6000){ $query = "SELECT title FROM `table` WHERE id = '".$i."'"; $result = mysql_query($query); if(mysql_num_rows($result) != 1) { // insert new $query = "INSERT INTO `table` ( `id` , `entry_date`, `title`, `status_name`, `vip_mark` ) VALUES ('".$i."', '2008-10-28 01:00:00', 'NULL', 'Completed', '0');"; echo $i."<br/>"; } $result = mysql_query($query); $i++; } echo 'done';
  4. Yes I guess the admin of previous system just deleted some rows instead of setting 'deleted' to 1. The data is right now on MySQL and yes I can export to csv.
  5. I suppose I am looking for some command in MySQL that does this: $i=0; while ($i<6000){ [sELECT from table where id=$i] [if no record, INSERT one with id=$i, name=NULL] $i++; }
  6. Its a little tricky to explain. I am importing about 5000 records to another system. The new system will create new keys for each record, therefore 'dave' above will become id=2 on the new system unless I put in a blank record for id2. I need to avoid this happening because people will expect the same id numbers for the records.
  7. I have data as follows: id | name 0 | john 1 | bob 3 | dave 4 | ralph 5 | david 7 | sam 9 | james As you can see, the 'id' column has many missing values. I want to autofill all the missing values so data becomes like this: id | name 0 | john 1 | bob 2 | NULL 3 | dave 4 | ralph 5 | david 6 | NULL 7 | sam 8 | NULL 9 | james Is there some command that can easily do this in SQL? (MySQL5)
  8. I made an intranet for my company. I want to make a video tutorial of the key features, using screengrab video of my mouse doing things on my PC. Then I wanna add a voice over. What software is available to do that? Any reccomendations?
  9. I have some user records stored in two tables. The table structure is identical. table1 = latest data table2 = archived data (once a month the latest data is added to the archived data). Question: How to select data from BOTH tables at once? I tried this but it failed: SELECT `lastname` , `firstname` , `email` FROM `table1` , `table2` WHERE `country` = 'CN'
  10. I want to unsecure 500 PDFs quickly. They all have the same password. Is there any software that will do this kind of batch processing?
  11. I have a multi language website. Sometimes users send messages to us via the online contact form. This uses the mail() function in PHP. The problem is, when chinese or korean is in the subject, the from and subject data is lost. Actually it is fine in gmail, yahoo mail, thunderbird and everyones email client except my companies local email client (Eudora, japanese version). So for everyone else it is ok, only us here get the lost data. I dont know if this is caused by our homemade anti-spam program or Eudora or something else. The systems guy said its a bug in my code, which is think is dubious. Something about the MIME type not being set correctly etc. This is my code to send email: $emailTo = 'bob@domain.co.jp'; $emailSubject = clean($_POST['subject']); $emailMessage = clean($_POST['msg']); $from = "admin@domain.co.jp"; $headers .= 'From: ' . $from . "\r\n"; $headers .= 'Cc: ' . $emailCC . "\r\n"; $headers .= 'Bcc: ' . $emailBCC . "\r\n"; $headers .= "X-Mailer: PHP/" . phpversion() . "\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/plain; charset=utf-8\r\n"; $headers .= "Content-Transfer-Encoding: 8bit\r\n\r\n"; $emailed = mail($emailTo, $emailSubject, $emailMessage, $headers); ... Is there something wrong with that?
  12. Yeah im starting to think its a problem with my local server which has all kinds of anti spam and stuff on it and cannot handle chinese etc. im gonna find out if the real recipient gets this blank subject problem or not.
  13. I will try to remove the striptags from the mail as advised. But I have no way to test this, I tried recreating the error using the original data (it gets stored int he DB ok before pulling out and mailing) but I cant recreate it. So I just have to wait and see. In this case they did fill in the fields. Even if they didn't, it should still make a subject of "Quote(/)" or similar. The problem I had was the subject was NULL. Hopefully the advice above will solve it (although wouldnt that be a bug in PHP / mail function?).
  14. I'm using the simple mail() function. mail($To, $Subject, $Message, $headers); 95% of the time it works fine, but twice now it has sent out the mail using the correct 'to' and 'message' fields but the 'subject' and 'headers' were empty. I declare the 'subject' immediately before sending the mail with this line: $Subject = "Quote (".$thecountry."/".$lang.") ".strip_tags($_POST['company_name']); The headers are also set in this way, then the mail is sent. I can't think of anything that would cause the values to disappear such as using sessions etc. Whats going on here?
  15. I want to redirect all requests for .pdf files from one dir to another. OLD DIR:  www.domain.com/en/product/pdf/ NEW DIR: www.domain.com/global_pdf/ ...so when someone requests: www.domain.com/en/product/pdf/john.pdf it loads: www.domain.com/global_pdf/john.pdf I think I need to use RedirectMatch or RedirectRule  to check for *.pdf but I have no idea how to write the expression matching thing. Can anyone help with this?
×
×
  • 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.