On a webserver, I have a php script that parses a .sql file (which is stored directly on the server), and executes the queries on a mysql database. I have a lot of french characters that doesn't insert well: é becomes é.
When I open the sql file with notepad++, I see that the encoding is "uft-8 without BOM".
My script looks like thi...
I have two tables like this:
TABLE user(
id CHAR(100)
text TEXT
)
TABLE post(
postid CHAR(100)
postedby CHAR(100)
text TEXT
FOREIGN KEY (postedby) references user
);
I need a query that for each user concatenates the TEXT column of all posts of that user and put them in the text column of the user. the order is not ...
Like most users, I'm simply trying to figure out a secure way to store passwords. What I haven't found here (or maybe it's my lack of understanding) is how to retrieve a salted hash in my database and separate the salt from the hashed password, especially with unique salts to each password while maintaining the salt+password in a single ...
I'm developing a website in Brazilian Portuguese and I'm facing some really annoying encoding problems.
Words that should be written this way: óbito are being written this way: �bito
I have noticed that while the texts are still at the database they are ok. But when I use echo with PHP, the encoding problem comes up.
List of things I ...
hi all. I have a such problem which I couldn't solve in a good manner. My solution needs too much time and loop uses catastrophically big memory. So I need a help.
I have 3 mysql tables.
Gorups
group_id
group_name
games
game_id
game_name
questions
question_id
game_id
question_name
question_text
question_groups
question_i...
I don't know if I'm missing something, or what, but I've been looking over the cakephp cookbook a lot lately and I don't think I have figured a way from it to get "x" number of rows (say 100) based on criteria.. right now I'm just using the find method to get all rows and then using my php controller to make use of only the ones I need, ...
Hello I have a search engine, but in the pagination I have to redefine the searchterm in the url, I mean <a href='http://mysite.com/search.php?q=searchTerm&currentPage=2'>Next</a>.
Please tell me if I'm doing it well or there is another way to do it
...
I need to convert default mysql modtimes into UTC formated datetimes using xslt.
I have an xml document that contains dates that originated as mysql modtimes in the format:
2010-06-30 15:20:43.0
They are now in an xml document within an element "datestamp"
2010-03-16 13:52:56.0
In order to be published via an oai-pmh feed they need to...
Right now I'm creating a web-app which requires that multiple sets of data (including a URL, title, and date) be stored in a DB.
So for example, User1 may be storing Item 1 which consists of Example, http://example.com, and YY-MM-DD HH:MM:SS. And he may have multiple items with the same types of data.
Before, I was sotring all the item...
I have a site that shortens links based on Noah Hendrix's tutorial on the subject. I decided that it would be great if I could track when users click the short URLs, similar to the way that HootSuite users can track their links with Ow.ly. I currently have a database which has the short URL stored along with the true URL and it's click...
Migrating Data from MySQL server1 to MySQL server2
server1 Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (x86_64) using readline 5.2
mysql> SHOW VARIABLES LIKE 'character_set%';
+--------------------------+------------------------------------------+
| Variable_name | Value |
+------------...
I am building a web application and have opted to use similar table and field names to Wordpress in my application. By that I mean I have a users table and a usermeta table similar to how Wordpress works.
Forgive me for making this question so big, I opted to be as descriptive as possible in this question.
The usermeta table has the fo...
MYTable.objects.filter( where id = 42, 55, 65, and 55)
and it returns a query set ?
...
How can I add index to an 18 GB innodb mysql table without affecting the production performance? The table is frequently accessed, I tried altering the table just now and it turns up to have locked more than 200 queries out, and that's bad for performance. Are there any other ways to do it?
...
I have a website where visitors can leave comments. I want to add the ability to answer comments (i.e. nested comments).
At first this query was fast but after I populated the table with the existing comments (about 30000) a simple query like:
SELECT c.id, c2.id
FROM (SELECT id
FROM swb_comments
WHERE pageId = 1411
...
How To process a result in a stored procedure
Suppose i have
sql = "SELECT fname, lname FROM students WHERE name ='Sam' ";
How will i fetch this result in variable and loop in a SP
like we do in PHP as:
$sql = "SELECT fname, lname FROM students WHERE name ='Sam' ";
$qSql = mysql_query($sql);
if ($qSql )
{
$fArr = mysql_fetch_array(...
This is driving me crazy, I am trying to do something like:
$this->data = $this->Prox->read('proxy',$currentgetdata);
$this->data['Prox']['checked'] = 2;
$this->Prox->save();
where I have a model association of:
class Prox extends AppModel {
var $name = 'Prox';
var $primaryKey = 'id';
...
Is it possible to get the current UNIX timestamp with sql?
...
Hi,
as the title said, I have a problem between java and mysql
The mysql DB, tables, and columns are utf8_unicode_ci.
I have an application that took some input from an xml, then compose the query...
public String [] saveField(String xmltag, String lang){
NodeList nodo = this.doc.getElementsByTagName(xmltag);
String [] pos = ...
Hello
I'm in the process of setting up a system which will have to repeatedly parse large amounts of text (as a String or StringBuffer - which might be better?) acquired from the a data source. The text will be displayed and may consist of several thousand words and each time the text is parsed, each word may have to checked against a l...