Jump to content

Bldyhll

Members
  • Posts

    5
  • Joined

  • Last visited

Bldyhll's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. As first note, thanks for the information. It is painfull that my coding got this bad but I am gratefull for it. @mac_gyver I am trying the pdo->quote methode but it doesn't seem to work because the string has a lot of single and double quotes. I known the mysql_escape_string doesn't account the charset but the data is not user inputted. It was the only way I found though to get the script working without setting up an additional db connection (no need for the mysql_connect with the simple function). The mysql functions are how I started with php but I will note that I can erase that out of my mind . val1 is a string which will almost always contain html code, val2 and val3 are hashes from these strings (I know one hash is enough but I really do not wish to allow a chance for a collision). The tip about the autoincrement was also nice there I am adjusting all my code atm to scrap that out of them. @psycho No worries they do have right names here just prefer to be carefull because I know my code is bad and don't want somebody to google my website and suddenly find code scraps. I might try your implode function in order to fix my html like string from value1, it is the main issue
  2. Update, I managed to get the code running and working fast (or so I believe) . The following code is the end result, while not perfect it seems to do the job relative okay. In order to give an idea, executing the script and putting 24 rows in the table is done witht he following time 1.67 real 0.07 user 0.02 sys
  3. Mmm some of my values contain single quotes but real_escape en pdo don't seem to work together. Imploding the data won't help with that correct?
  4. Well I am going to be honest, you kind of lost me.. if I start googling about multi-value insert query then it is different from my current code so I would have to rewrite it. So what I did now is the following : So if I understood it right this is supposed to be the fastest way in order to do it?
  5. Hello all First of all nice to meet you since this is my first post. I have been reading already for a longer time but so far I managed to always fix my issues. Currently I am having the other way around so I registrated and decided to ask for help. The goal is to push multiple insert into the database on the quickest possible way, Originally I did a loop insert but performance dies rather hard that way. I got the code to the point that it is working without errors however it only inserts the latest row and not all of them. Basicly that's the reason for my raging (hence the name) and my question do you guys. Should I take the hammer for my own head or my server ? Thanks in advance Bldyhll
×
×
  • 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.