Hey guys I am having trouble trying to convert my web app to support unicode characters. I have the following script which tries to insert russian characters into my mysql database but just outputs ?????? in my mysql database field. I have changed default charset to UTF-8 in my php.ini and have modified my table fields to collation: utf8...
I have a mySQL database that tracks our projects and drives our website's display of their info. For ease of updating the database I have set up an access database that used an ODBC connection (MySQL ODBC 5.1) to edit the data. It has been working just fine for the past few months with no hiccups.
However, last night users(2 of 3) exp...
Hi,
I have a table with a primary key called 'id' and I am using ADODB and getting a ADORecordSet_mysql back. I need an array where the id is associated with a row in the result set, but ADODBRecordSet_mysql only seems to have a GetArray(int startingRow) method that returns an array indexed by startingRow (where the default is 0).
I ...
Hi, I have to do a check that a date stored in a database in UK date format dd/mm/yyyy is greater than a given date, e.g 01/01/2010 - what is the best way to go about this? Thanks
...
I hope I'm not being too long winded in this question, I just want to make sure that what I'm asking is completely clear (I think it's rather confusing :).
I've got a database with a bunch of tables with all my foreign key constraints set up. Relations are sometimes several tables deep, and there are also cases where a child is related ...
I am working on my first login script. I have been following examples from a book, but this is where I am stuck. I want the user login to be an e-mail address, but when I would hit submit, I would get this error.
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\wamp\www\mysite\index.php on line 19
...
I am fighting with lock timeout problem on mysql right now. The front-end code is in Ruby on Rails, which updates some tables. In mysql log, I see things like the following
Transaction 1 ... process no 3353, OS thread id 1094527296 inserting
INSERT INTO ... (caused by code in Ruby on Rails)
record lock for index 'PRIMARY' table 'A...
Is there a good way to connect from Flash Media Server 2 to a Database (mysql)?
If not, where does everybody store for example their user data?
The application crashes once per day, so thats why I need to save the important data into a database. And also to validate certain userdata, for example username/password.
Thank you in advanc...
Hi Folks,
I'm trying to User MySQL Connector/C++ with Qt, and had spent hours pulling my hairs on a problem. Here's a SIMPLE code to test out the connection:
int main(int argc, char *argv[]) {
QCoreApplication a(argc, argv);
cout << "aa" << endl;
sql::Driver *driver;
try {
driver = get_driver_instance();
} catch(exception &e) {
...
Here is what I am looking for. I would love to have a tool that can be used to populate a database, allow us to do some interactive testing, and then reset the database to where it was before we started using it. Kind of like a DB fixture for unit testing, but for a user to use instead of an automated test suite. Does something like t...
Hello to all!
I have a SQL statement in which I do this
... group by date having date between '2010-07-01' and '2010-07-10';
The result looks like:
sum(test) day
--------------------
20 2010-07-03
120 2010-07-07
33 2010-07-09
42 2010-07-10
So I have these results, but is it possible, that I can wr...
I'm trying to connect to MySQL using MATLAB R2009b 64 bit and the mysql.cpp file found on the FEX and here. I followed all the steps to compile listed in the second link. After entering the following:
mex -I"C:\mysql\include" -DWIN32 mysql.cpp "C:\mysql\lib\opt\libmySQL.lib"
the mysql.mexw64 file is created in my working directory. Ho...
This query works:
SELECT Article.id,
Article.post_time,
Article.post_locked,
Article.comments_locked, Article.title,
IF(CHAR_LENGTH(Article.content)>2000,
RPAD(LEFT(Article.content,2000),2003,'.'),
Article.content) as content,
Article.tags, Category.*,
User.id, User....
I'm a bit of a novice to PHP and MySQL. I'm creating my own little news blog for the heck of it. I got to display the information I wanted, but what I want to do is count the number of comments. I made 2 tables, the first table is the article and the other is the comments. I not to sure of how to figure this out. Can anyone help?
$...
How can I do a SELECT statement and have it returned the data incolumns instead of rows?
FROM
+----+-------+--------+
| id | name | number |
+----+-------+--------+
| 0 | test | 11 |
| 1 | test2 | 12 |
+----+-------+--------+
TO
+----+------+--------+----+-------+--------+
| id | name | number | id | name | number |...
INSERT INTO
product_search_table (id, score)
VALUES (
SELECT product_id, 50 FROM cart_product WHERE product_id = 555
)
Is giving me an error. What am I doing wrong?
555 is going to be replaced with a variable.
...
Hi, I was reading through our code base at my company and I saw something that seemed like it could be done better.
$dbRow = $dbh->Execute("SELECT * FROM database.table LIMIT 1");
$tableColumnCount = $dbRow->_numOfFields;
Is this the only way to get a column count using ADODB? It just seems silly to have to execute a query so you can...
how much ram needs mongo in comparison with MySQL?
...
I'm running a pretty basic subquery on MySQL 4.0.30.
My goal is to get the user permissions from the mysql.user table for any user with grants on a specific database, as noted in the mysql.db table. The query looks like this:
mysql> select * from mysql.user where User IN
(select User from mysql.db where Db='db_name')\G
As you can...
I have about 1 million rows so its going pretty slow. Here's the query:
$sql = "SELECT `plays`,`year`,`month` FROM `game`";
I've looked up indexes but it only makes sense to me when there's a 'where' clause.
Any ideas?
...