Hi guy,
I was wondering if sanyone could help me with the following:
I have some info inserted into mysql database on a couple of pages. After this is done I retrieve these info (in a new page) from the database and want to send them via email to various emails including one from the info from database.
I have built the email() functio...
Hi,
I'm trying to execute a select using C#. The problem is that, despite the fact that I modified the timeout period, it thrown a timeout exception. It is rising the exception after 30 seconds, that is the default value.
using (MySqlConnection conn = new MySqlConnection(connStr))
{
int x = conn.ConnectionTimeout;
conn.Open();
...
I have a script that does a lot of legwork nightly.
It uses a PDO prepared statement that executes in a loop.
The first few are running fine, but then I get to a point where they all fail with the error:
"MySQL server has gone away".
We run MySQL 5.0.77.
PHP Version 5.2.12
The rest of the site runs fine.
...
Possible Duplicate:
Which is faster/best? SELECT * or SELECT column1, colum2, column3, etc.
In some code I'm reading, all SELECT statements are using a list of field names where all fields in the table are being selected. For example, with a table called Book and fields Author, PublishDate, Pages and Price, the select statem...
I'm really stumped by this. Here is the php:
Update: I have escaped the inputs (before I did this a different way, but didn't know about mysql_real_escape_string). Also, I replace the double quotes with single quotes, yet the same problem is happening. Below is the updated code:
$request = mysql_real_escape_string($_POST['id']);
$c...
Good day, I have a question I'm struggling with a lot, hope somebody already found a clever solution to this (I use MySQL).
I have table like this:
Table `log`
----------
id
inserted
message
user_id
My goal is to select last inserted record for user and make this fast. Log table is huge (around 900k records),
so my first approach was...
Hi, I'm trying to sort a user table based on how many comments they have linked to them in a secondary comment-table, I figured a sub-select will be the best tool but I can't get the syntax correct.
Users table testdata:
id | user_id
1 | 1000
2 | 1001
3 | 1002
Comment table testdata
id | link_id
1 | 1002
2 | 1000
3 | 1002
4 |...
Hey guys,
I'm trying to update a site that was coded horribly, and I think there is an error in this multiple IF statement. I've been Googling for a while and can't find any example of multiple IFs in a MySQL UPDATE query.
The idea is, we want to update a certain column of the row based on a different column of the row.
Here's the que...
I building a sl + ria application. I can add a model on asp.net project but when I add a dataservices class the tables from model(EF) does not show.
...
I have a table with:
city
latitude
longitude
And I need a sql query to know all cities are 100 miles from new york.
Could anyone help me before I go crazy ?
...
I have 2 very simple update statements that I need to use inside of a stored procedure. I want to use a transaction to rollback if either one of these updates should fail. Could someone please give me a sample to go by or point me in the right direction? I cannot seem to find what I need. I have no code at this point with exception of th...
I have used python2.6 + MySQL on Windows and there are binaries available.
I wanted to get the whole thing working on Solaris
Hence got the Mysql-Python package from here
I had to get the setuptools installed which is done.
Exploded the MySQL-python-1.2.3c1
When I this
/jython2.5.1/jython setup.py build
Error -
`File "/opt/somepat...
Is there a "Force Index" from MySQL equivalent in Vertica DB?
...
Hi all,
What's the best way to perform fulltext searches across rich media files? I'm trying to implement a system where the user could upload random files (.doc, .pdf, .jpg, ...) and down the line, he would be able to search for them based on the file contents or metadata.
I would appreciate some ideas on how to build this.
PS - I st...
I now find my original table structure was not good, so want to change it.
But I am having a hard time designing queries to obtain totals in rows with the new structure.
current structure:
+----------+-------+-------+-------+-------+
| state | shop | item0 | item1 | item2 |
+----------+-------+-------+-------+-------+
| 5 | ...
I have one table GAMES and another PLAYERS. Currently each "game" has a column for players_in_game but I have nothing reciprocating in the PLAYERS table. Since this column is an array (Comma separated list of the player's ID #s) I'm thinking that it would probably be better to have each player's record also contain a list of the games th...
this is little hard one. i have latitude and longitude and i want to pull the record from the database, which has nearest latitude and longitude by the distance, if that distance gets longer then specified one, then don't retrieve it.
Table structure:
id
latitude
longitude
place name
city
country
state
zip
sealevel
...
I am building a aync single threaded server that receives data from clients. It processes the data and then saves it to the MySQL Database.
The problem is that, MySQL C API does not support non-blocking calls and asio mainly does not like blocking calls.
So I am thinking something like Python Twisted's deferToThread() like semantics. I...
I have a cross reference table and need to find common values of one ID where the second ID has multiple values given in the query. This is easy to do with an "OR" but I can't for the life of me figure out how to do it with an "AND". I'm sure there is an obvious solution that has been staring at me for these many hours but I can't find...
That's the error I get when I run this code :
if(mysqlpp::UseQueryResult res = conn.query(sql).use())
Whats more interesting is that the next line doesn't have any problems
while(mysqlpp::Row row = res.fetch_row())
Really driving me crazy. I've even manually included result.h
I tried all combos of these
include result.h, mysql++...