Skip to main content

All Questions

5 votes
2 answers
4k views

MySQL: What does means "escape '!'" on query

Editing someone else's code found this query: SELECT c.name AS category_name, p.id, p.name, p.description, p.price, p.category_id, p.created FROM products ...
quantme's user avatar
  • 3,655
0 votes
0 answers
250 views

mysqli_real_escape_string() does not work in database

I am using mysqli_real_escape_string() function for prevent SQl Injection.My code <?php // open a connection $dhost = 'localhost'; $duser = 'user'; $dpw = 'pass'; $dname = 'db_name'; $connection ...
user avatar
-2 votes
1 answer
2k views

How to show the original character like \n \t in mysql in a select statement

when I run select statement from mysql database, characters like \n \t will be escaped. Is there a way to see these original characters in mysql? What I want to see is something like "java.lang....
Bargitta's user avatar
  • 2,426
0 votes
1 answer
439 views

How to bind queries that use variables for the LIMIT parameter in Codeigniter

I am trying to fix a query in codeigniter, by binding queries for safety. But I am unable to use "?" in the limit parameter of the sql query. Without using codeigntier's query builder, how can I fix ...
Jack Hanson's user avatar
0 votes
2 answers
4k views

mysql_real_escape_string() function not working in wordpress WP_Query?

We have tried this way. But it is not working. please any one tell alternative method in wordpress $wpdb->query("UPDATE ".$wpdb->prefix."recommend_bets SET `title`='".mysqli_real_escape_string($...
Arun Kumar's user avatar
  • 1,667
1 vote
0 answers
218 views

PHP real_escape_string() - allow emoji references [duplicate]

I have a web service which inserts various user input into a MySQL DB. My DB insert statement uses $db->real_escape_string() for security on all input. However this seems to be stripping out ...
Mitya's user avatar
  • 34.7k
1 vote
2 answers
2k views

Escaping semicolon in phpmyadmin

In PHPMyAdmin I want to replace "aa;bb" -> "aabb", by running the query: UPDATE `question` SET `text` = REPLACE(`text`, 'aa;bb', 'aabb') WHERE INSTR(`text`, 'aa;bb') > 0; ...
Jake B.'s user avatar
  • 465
0 votes
0 answers
118 views

from real_escape_string appears as text on browser

From real_escape_string code is showing as text not running on browser, even dreamweaver showing no error please help if any alternative then please tell me. trying to create a subscribe php form with ...
Pranit Shinde's user avatar
3 votes
1 answer
2k views

Sanitizing URLs being inserted into a WordPress MySQL database

I am writing a plugin for Wordpress, where I have my own custom table to store the relevant data being pulled from a remote API. One of the elements I need to store is a URL, which is a TEXT field ...
user avatar
0 votes
1 answer
594 views

Escape quotes in MySQL query on python

I am trying solve problem with quotes in my sql queries. I know that many questions were asked on stackoverflow. But no one worked for me. May be because I am using other framework (pyMySQL) for sql ...
JohnLemon's user avatar
  • 157
1 vote
0 answers
21 views

Escape again after value manipulation in PHP [duplicate]

Let's say i have this code: $value = mysqli_real_escape_string($con, $_POST['value']); $value = strip_tags($value, '<br>'); for example with this value: $_POST['value'] = "<div>how<br/&...
Itay Ganor's user avatar
  • 4,205
-1 votes
2 answers
809 views

Mysql real escape string not working for textarea apostrophe on insert getting syntax error

Whenever I'm trying to insert data that has an apostrophe in it, I receive a mysql syntax error Example text in textarea : I'm an alien will throw a syntax error when I try to insert in the ...
Sebastian Farham's user avatar
0 votes
2 answers
186 views

Trying to make a work around for the mysqli_real_escape_string

So currently I have my code in procedural format so inorder to prevent myself from adding the "link" in the mysqli_real_escape_string function I've made a method that looks like this: // Used to ...
OverBakedToast's user avatar
0 votes
0 answers
48 views

PHP 5.6 mask all $_POST VAriables [duplicate]

i have a problem. I want to mask via mysql_real_escape_string all $_POST Variables (include $_POST array). The Script mask only $_POST['das'] and no $_POST[template_id] (its empty) How can i mask $...
Em Hi's user avatar
  • 59
0 votes
1 answer
163 views

MySQL real escape - Own escape - o to ö?

I want to escape all my strings I want to insert in my database. But my problem is, because I have more than 10.000 strings to check, the database queries would be too much... So I use this escape ...
Fraze Jr.'s user avatar
  • 143

15 30 50 per page
1
2 3 4 5
15