Nice to meet you. Thanks for your help.
I am new to the program, but the PHP version of the rental server has changed from 5 to 7, the mysql function can no longer be used, and is changing to mysqli.
The following is a part of the source that inserts data from CSV to MySQL, but it changes to php7 and it is an error that can not proceed. (Error at mysql_real_escape_string)
$query = sprintf ( 'INSERT INTO reins_data (% s) values (% s);' , mysql_real_escape_string (implode (',', $cell_sql)) , implode (',', $line_sql) );
The above part certainly borrowed a part that was answered to the question in this StackOverflow, but in order to deepen the understanding of this time, I investigated each function in order It is a situation.
And here is the question, but mysql_real_escape_string is
If i change to mysqli_real_escape_string,
http://php.net/manual/en/mysqli.real-escape-string.phpIf i look at
etc., it is written that the argument is different, but what kind of contents will it be in the above case?
I don't know if I should disclose the current source to a certain extent, and only a part is shown, but I will disclose it if necessary.
I would appreciate any advice.
I didn't understand the question even after looking at the manual, but I reviewed the manual in a word from Mts10806.
As a result, it was solved, but it was too difficult to see the manual. In other words, it was solved as per the manual. Thanks to mts10806 for giving me the opportunity to review.
Answer # 1
I think you should move to basic PDO.
It is not good to rely on the database engine too much.
Answer # 2
It was solved according to the manual. I caught it too hard.
- php - please tell me about the transfer mode and line feed code in ftp
- php - please tell me about the development environment for web applications
- python - please tell me about scraping
- php - i would like to know about relative paths
- about the predefined function eval() in php
- about writing "or" or "||" in the condition of php switch statement
- about environment construction of windows10 iis php74
- php - about passing results from function to function
- php - about error when redirecting laravel
- php - [twitter] please tell me how to determine the response when requesting the post url mm
- php - should i use pdo or mysqli? what are the advantages and disadvantages of each?
- php - about laravel syntax best practices
- please tell me about python arrays
- about php character conversion
- php - about laravel authentication restrictions
- php - about errors in foreach processing
- i'm not sure about the pointer, so please give me some advice
- php - about laravel58 trait'illuminate\database\eloquent\softdeletes' not found
- about session_start() (php)
- php - about repeating smart custom fields
- php - laravel hypertextcandy tutorial chapter 8 linking userid
- php - i want to insert many users at once
- php - format date with datetime() and output to html
- calculated by extracting from the php list
- in resultphp, i want to implement the process to display all the records added so far
- php - when posting an image to mysql, is it a data or a path?
- php - update does not work
- php - why doesn't lock tables work unless i write "table prefix (wp_)" in wordpress?
- [php] i want to get the result obtained by sql
- php - i want to include the value of acf pro(advanced custom fields) field in the_content