mysql

Character encoding problem using ScrollableResults and MySql

I'm doing private void doSomething(ScrollableResults scrollableResults) { while(scrollableResults.next()) { Object[] result = scrollableResults.get(); String columnValue = (String) result[0]; } } I tried this in two computers It works fine. It is a Windows 7. System.getProperty("file.encoding") returns Cp1252. ...

Possible to have drupal read from a sql database?

I have a site under drupal (using mysql) but need it to read from a external sql database and make quires/reports, maybe using views2? Is is at all possible? I been looking for a solution to just read (not import, its thousands of entries...) from an external database for hours and not sure if its even possible. ...

Nested Set Model Php library

Hi I need to use the nested set model to mange product categories on my site. Does anyoune know of some good pre-built PHP libraries for handling nested sets in MySQL? ...

Convert text passwords in database to hashed passwords?

In my database I have over 600 users. The passwords were previously stored as plain text (slap on hand, I know). Anyways, I have changed my code to store STA1 hashed passwords, but I need to convert the existing passwords in my database so each user doesn't need to go in and modify their account. Any help? ...

pyodbc and mySQL

I am unable to connect to mySQl db using pyodbc. Here is a snippet of my script: import pyodbc import csv cnxn = pyodbc.connect("DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost;DATABASE=mydb; UID=root; PASSWORD=thatwouldbetelling;") crsr = cnxn.cursor() with open('C:\\skunkworks\\archive\\data\\myfile.csv','r') as myfile: rows...

how to send database query result in json and display results in javascript?

Can any one give me example or reference for converting mysql database query results in to json object and send it to javascript file then parse the json and display results in javascript file using jquery? Thanks. ...

mysqldump and database users...

Alright, Let me preface this with the fact that I'm assuming I am lacking a fundamental understanding of mysql. I'm attempting to assemble all the options that I need for mysqldump to create everything used by my applications database into a single script. This includes the database itself and all the database users/passwords/privileg...

PHP: MySql Data Type for monetary values.

What is the best way to store monetary values in MySql. I've seen this: decimal(5,2) but then you can't enter in more than $999.99 for the amount. I mean I know you can change the 5 to something else but this doesn't seem like the most appropriate way to do this.. then again I'm not sure that's why I'm posting. I've also seen storing ...

[PHP] MySQL (5.x) database backup/restore to file tool.

Welcome, I'm looking for php class what allow me to backup MySQL (5.x) databases under PHP. I test many from phpclasses but most all are written for mysql 4 and under mysql5, generate wrong code. Class should allow me to dump my database into file. easy restore that file. generated file (.sql) should be compatible with phpmyadmin. ...

mysql : a pivot table handler request ?

Hi all, I have a mysql question : using php with mysql I actually have a schema that looks like this : 3 tables : module module_has_theme (pivot table) theme The idea behind this is to display the modules of my application using themes if they have, and if they don't, then display them in an extra category (other). So let's say if...

how do I capture and return a scalar result from a my-sql prepared statement?

So I wrote this nice little stored procedure that accepts 3 parameters, assembles a query string, executes a query, and retrieves a single row of data from the specified table. It then converts the single row into well-formed XML. The call to EXECUTE query2; is where the XML is returned. When running it in the Toad MySQL Editor, obvio...

SQL List Game Database By Most Likes

So my site's main page display's applications for a PMP. Users can rate these apps with 'Like', 'Dislike', or 'Neutral/None' (every app is rated Neutral/None by default.) On the main page I wanted to list the games by the highest difference (So it would take the total Like's and Dislike's then add them together.) I'm having difficulty m...

In MySQL workbench what is username/password for connection?

I'm new to MySQL. I'm doing the tutorial and trying to create a connection. I need to have a username and password. I get an error each time saying it can't connect to username@localhost using password YES . I'm just trying to set this up locally. What is the username and password supposed to be? How is the account created, where can I ...

schedule_fu locks mysql up

I've been using schedule_fu for recurring events but I keep getting this Mysql::Error: Lock wait timeout excedded. Anyone else experienced this problem or do you know what causes a Mysql::Error like this. I'm using Rails 2 and developing on OS X. SQL (0.1ms) BEGIN SQL (0.1ms) SAVEPOINT active_record_1 CalendarDate Create (0.0ms)...

html select php processing question?

i have this select box that users can use to choose an option, but im stuck on how i can process it with php and insert the value in mysql: <select name="vote[]"> <option value="support">I support this</option> <option value="against">Im against this</option> <option value="dont">I want the audience to decide!</option> $insert...

MVC2 MySQL Hosting Issue?

I have an MVC2 app that utilizes MySql.Web ver. 6.2.2.0, on my dev machine locally it works fine! However, once I upload it to my http://www.winhost.com account I get the following error: Parser Error Message: Unable to initialize provider. Missing or incorrect schema. Line 32: <clear/> Line 33: <add name="MySqlMembers...

Update to PHP 5.3 on Debian 5.0-i386-default

Hello, I currently have PHP 5.0 installed on my Debian VPS and was wondering how I would be able to upgrade it to PHP 5.3 and keep all of my installed modules running. Thanks, Jake ...

MySQL User Defined Function to send a windows message...

G'Day, I want to use the Windows API Postmessage() call from inside a MySQL UDF on MySQL 5.1.51 (XP SP3). I know the UDF (Written in Delphi 2006) is working by setting a bogus result for the UDF. The syntax of the UDF takes two integer params, one for a window handle and the other for a message number. However a call to PostMessage() ...

How to install mysql on a new machine for an old app ?

Not exactly sure how to go about this. My app's database.yml development: adapter: mysql encoding: utf8 reconnect: false database: application-dev pool: 5 username: root password: angles123 socket: /tmp/mysql.sock I was thinking that it would be wise to go ahead and mysqladmin -u root --password=angles123, and then on...

Joomla TPlancer component adding new field and displaying

I have the TPLancer component for Joomla installed on my site and I am trying to add some more information to the profile page of both the Freelancer and the Buyer. I am no genius with PHP or mySQL but can kind of bluff my way thru usually. The information currently displayed on the profile pages is just data pulled from the database. I...