1
vote
3answers
45 views

How to change order of substrings inside a larger string?

This is fairly confusing, but I'll try to explain as best I can... I've got a MYSQL table full of strings like this: {3}12{2}3{5}52 {3}7{2}44 {3}15{2}2{4}132{5}52{6}22 ...
-4
votes
1answer
58 views

mysqli_fetch_array() expects parameter 1 to be mysqli_result, string given [closed]

I have seen many similar errors, but mine is quite original in the fact that it is not "boolean given" like everybody on the internet, but "string given". By the way it works perfectly well, but it ...
0
votes
0answers
34 views

sql::SQLString behavior

I get a strange behavior in my CPP application using the mysqlcpp library with sql::SQLString. When I create a ne SQLString, either from const char or std::string, it seems like the constructor ...
0
votes
4answers
54 views

extract URLs from href inside unordered lists and insert into mysql with PHP

I have several unordered lists. The list items are URLs. How can I extract the URL and link text from each list item to insert into a database? <ul id="1"> <li><a ...
1
vote
2answers
31 views

Cut all strings in column to a specified number of characters no chopping words

I need to find a way to reduce all the entries of a specified column to a specific number of characters, lets say 100, but without chopping words, is this possible in mysql 5.0? I am no programmer, ...
0
votes
1answer
30 views

Subtract two strings in PHP or mySQL to count differences [duplicate]

Is it possible to return the number of characters which differ between two strings? In my case, I would like to run a check to quantify how much a user's draft has changed vs the database version. ...
-1
votes
0answers
31 views

Django: mysql query how to make string safe?

i'm new to Django and i just want to know how can i get the argument "db" safe for mysql injections? cursor.execute("GRANT USAGE ON "+db+".* TO %s@%s", [username, host]) Or how can i handle it with ...
0
votes
1answer
38 views

Django: mysql query with arguments

i have a MySQL query like this cursor.execute("GRANT USAGE ON %s.* TO %s@%s", [db, user, host]) Python generate a query like GRANT USAGE ON 'db'.* TO 'user'@'host'; But the apostrophes around ...
1
vote
2answers
50 views

numbers issue after export mysql data to CSV

when i get data from database and export it as a csv file i have following issues : the leading zero of the numbers dosnt show big numbers shows like this -> 1E+12 how to force MS Excel to show ...
0
votes
2answers
29 views

Limit number of character after certain character

I'm trying to limit number of character being shown after specific character in a string. Example: The number is like : 1424124.991412 What I want is make it shown like : 1424124.99 How can I do ...
1
vote
1answer
33 views

Are some string comparisons not character by character?

With collation utf8_general_ci, MySQL considers Munchen and München to be the same, because with that collation u and ü are considered identical. Are there any collations where character sequences of ...
3
votes
1answer
58 views

MySQL compare string with national characters

I got a small trouble: SELECT * FROM tableName tn WHERE LOWER(tn.name) = LOWER('place_string_here'); It's ok, when it does a perfect fit: tn.name = orange_tree place_string_here = ...
0
votes
0answers
44 views

Using Groovy's ${…} with SQL

I have a question about using a string in a JDBC SQL query. Here are two examples and I expect both to work, but they don't. Working version ... tabl = "Action" query = "SHOW FULL COLUMNS ...
1
vote
6answers
57 views

PHP converting Strings to Arrays back to Strings

I am pulling data from a query that has the following output: 1 2 3 5 I am converting it into an array like so: $string = explode("\n", $result); I know have an array displaying ...
0
votes
0answers
13 views

mysql c++ connector getString returns WCHAR collation

I have a simple code that retrieves a string from a MySQL database: const char* uri = res->getString("uri").c_str(); uri is filled with strange characters. I edited the code as follows: WCHAR ...

1 2 3 4 5 37
15 30 50 per page