Using an ODBC connection to a mysql database, the connection times-out after a period of 8 hours (the default).
In order for my application to be resilient, it must recreate this connection to issue a prepared statement query.
Is it possible to issue a new database connection for a prepared statement?
Does it make sense to do so?
It ...
Hello
I have a Database with the following two tables, USERS, POSTS
I am looking for a way to get the count of how many posts a user has.
Users Posts
+----+------+ +----+---------+-----------+
| ID | Name | | ID | user_id | Name |
+----+------+ +----+---------+-----------+
| 1 | Bob | | 1 | 1 | B...
I want to set up a VPN server (via IPSec or PPP etc) but I want the authentication to be dealt by MySQL or other RDBMS... does anyone know an opensource project or an easyway to achieve this...? I'm flexible on linux distro, rdbms or vpn protocol... I urgently need a VPN access point that can be managed easily by a webapp.
...
The form submits correctly and it sends me an email. No error is reported and the SQL it creates works fine, I tested it at phpMyAdmin. mysql_error() raises nothing, it just doesn't add a row. Can anyone see what's going on?
<?PHP
$to = "[email protected]";
$subject = "New Lead";
$date = date ("l, F jS, Y");
$time = date ("h:i A");
$mysq...
Hello,
I have a table which looks like this:
ID Date Size Marked
1 2010-02-02 2 X
2 2002-02-02 1
1 2010-02-03 2 X
2 2010-02-03 3
3 2010-02-03 4 X
And I have a code (PHP) which does following things:
a) Calculate sum of sizes per day
b) Find the difference between tot...
Not a generic introduction to MySql. I have one of those and also a PHP & MySql book.
What's a good one to learn the C/C++ API? Or do I even need a book for that? Maybe it would be overkill?
...
UPDATE `test`.`documents` SET `title` = ‘测试中文’, `content` = ‘this is my test document number two,应该搜的到吧’ WHERE `documents`.`id` = 2;
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'my test document number two,应该æ
i used axmpplite, and...
I have a mysql server running and can connect to it from my Django ORM. Can't connect using the rdflib functionality. How can I debug this problem? Thanks.
rdflib 2.4.2, python 2.6, MySQL Community 5.1.42
Trace:
configString = "host=localhost,user=root,password=...,db=..."
print configString
host=localhost,user=root,password=.....
I have a site that stores <select> options in a number of tables, and extracts all of the relevant ones depending on the individual page. At the moment, I wind up with a query like this: SELECT foo FROM foo_tbl;SELECT bar FROM bar_tbl;etc. It's not really a bad problem, but I have to iterate over each select result individually.
I'd l...
How might I optimize this query? The schema:
mysql> show columns from transactionlog;
+---------------+-------------------------------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+-------------------------------...
I'm (thoroughly) learning SQL at the moment and came across the GROUP BY clause.
GROUP BY aggregates or groups the resultset according to the argument(s) you give it. If you use this clause in a query you can then perform aggregate functions on the resultset to find statistical information on the resultset like finding averages (AVG()) ...
I want to insert capital letters like:
"User One"
I want to insert to Mysql as : User One
But, apparently, mysql inserted as "user one". How do I insert the capital letters in mysql?
I am using php code to get the name:
$user = mysql_real_escape_string($_POST['user']);
Tested several times, same result. All converted to small let...
Currently I do all of my work off of a flash drive. Keeps things portable, and I'm able to learn web development while I'm at work. Currently I run Portableapps with XAMPP, Notepad++, and Chrome installed on it.
My question is, does anyone know of a version control system that would work portably on a flash drive? I just learned about t...
How to use LIMIT instruction with parameters in MySQL?
Like:
SELECT * FROM someTable LIMIT variable1, variable2;
...
I would like to generate all posts that has say a category name of X and a tag name of Y with in wordpress.
query_posts('cat=X List&tag=Y');
I above works to an extent but not fully since I need to repeat this list and just echo the_title(). The problem is very similar to the one found here http://bit.ly/ba4Zot ,the solutions provide...
hi, I am having apache 2.2.14, php 5.3.1 and mysql 5.1.43 installed on vista. I am trying since 2 days to configure php to have mysql enable on phpinfo().
I modified php.ini to have extension_dir = "c:\php\ext"
modified the extension as extension="php_mysql.dll"
added "c:\php" to the "PATH" environment variable and restarted the vista...
I created a virtualbox with a fresh install of ubuntu 9.10.
I am trying to get MySQLdb to run on python but I'm failing at the import MySQLdb
I first tried sudo easy_install MySQL_python-1.2.3c1-py2.6-linux-i686.egg and then sudo apt-get install python-mysqldb.
Both apparently installed ok, but gave me the following error message whe...
Hi,
i am running on php, mysql and using mootools1.2 as my js framework.
I want that all broken images should replace with a single error image.
How should i do this.
Thanks
Avinash
...
I have an array of php objects that I want to store into a mysql database table. The only way I can think of is just have a table to represent the object with a unique id and a separate table to store the array (there could be a column array_id and an object_id) but retrieving would require a join I believe which could get expensive. Is ...
Hello,
I'm using hibernate with mySQL and I've the following problem: I do a nativeSQL query on a table with, among others, a column that is a character long. This column can get to null. Now I receive the following exception while querying:
4-feb-2010 10.31.00 org.hibernate.type.NullableType nullSafeGet
INFO: could not read column val...