I'm about to lose it with this stupid mysql statement. Can anyone please tell me what it wrong with this statement please?
SELECT * FROM contacts
INNER JOIN ind_categories ON contacts.vendor_id = ind_categories.vendor_id AND ind_categories.category_id = "retail"
AND WHERE zipcode in ( " 93044,93041,93043 " )
...
SELECT
V.V_CONTACT, V.V_PHONE
FROM
VENDOR AS V,
PRODUCT AS P
WHERE
P.P_CODE = 'P1' AND
V.V_CODE = P.V_CODE;
...
If MySQL databases with a MEMORY engine are stored in memory, does this mean that their contents are not persisted to disk? Or are they stored on HDD, but fully loaded into RAM on system power up?
...
When I'm writing scripts in PHP to work with MySQL databases with a MEMORY storage engine, is it as fast as PHP variables? Can I consider using such a database in place of some variables for buffers, message queues, etc?
...
I only have two variables to work with here, age (unix timestamp) and hits. I'm wondering if there is a solution in MySQL to calculate and order by the popularity of something. The algorithm would have to acknowledge that new items would not necessarily have as many hits as older ones but are more popular.
Is this possible the way I'm i...
How do I SELECT rows and return all the columns, instead of specifying individual column names?
Can I also return only columns that match a specific criteria? (eg. col names beginning with an "_")
...
I'm joining 3 tables. the last one contains several photos per item. The idea is to get one record per item with only one photo selected at random.
The ORDER varies, the WHERE varies.
The best I could get is a subquery. There is a more effective way of doing this?
SELECT *
FROM (
SELECT *
FROM art
LEFT JOIN prov USING ( prov...
I'm a Python newbie, but I've just spent a day working out how to get MySQLdb working properly, and the universe according to google includes numerous references to what a PITA it is, and an inordinate number of guides that seem to be outdated. Given that this site is intended to address these sorts of problems, and I know that I'm goin...
Hello,
I am planning to launch a free webmail service at mail(dot)com(dot)es where users can signup and have their free webmail account (for example like www.email.gr). I am looking for a free or low cost webmail system script to install on my website. Do you know any free or low cost scripts which would be suitable for this?
Thanks
...
How can I NOT have the full result set from mysql copied into memory in django? I'm itterating over a BIG table which is blowing up my ram when the query copies.
It seems that mysql uses SSCursor for this purpose, and I can do all that with the mysql low level interface, but is there a Django way to do it?
...
(Using MySQL 4.1.22)
I can't get this query of mine to use an index on a large table(200k+ rows), it is doing a full table scan on it. The query takes about 1.2 seconds right now. I want to get it to less than .2 seconds if possible.
Here is my query:
SELECT st_issues.issue_id, st_issues.cat_id,st_categories.name AS cat_name, st_issue...
Hello
I recently wrote and deployed a Java web application to a server and I'm finding an unusual problem which didn't appear during development or testing.
When a user logs in after so long and goes to display data from the database, the page indicates that there are no records to see. But upon page refresh, the first x records are sh...
If I execute an insert query with a stored procedure with php and the mysqli_* functions, is there a way to retrieve the value of an autoincrement id field?
mysqli->insert_id does not seem to work.
...
What if I want to connect to Oracle, MySQL or even MS Access ?
...
I have a huge MySQL table which has its rows encoded in UTF-8 twice.
For example "Újratárgyalja" is stored as "Újratárgyalja".
The MySQL .Net connector downloads them this way. I tried lots of combinations with System.Text.Encoding.Convert() but none of them worked.
Sending set names 'utf8' (or other charset) won't solve it.
How can...
Hi All,
I am trying to install MySQLdb package. I found the source code here.
I did the following:
gunzip MySQL-python-1.2.3c1.tar.gz
tar xvf MySQL-python-1.2.3c1.tar
cd MySQL-python-1.2.3c1
python setup.py build
As the result I got the following:
Traceback (most recent call last):
File "setup.py", line 5, in ?
from setuptool...
Simplified table structures, all INT columns and no PKs outside of the identity columns:
Nodes (n) table: id
Attributes (a) table: id, node_id, type_id
Type (t) table: id, priority
I'm trying to select a set of attributes, each of which has the lowest type.priority for its respective node. Though there are multiple attributes per nod...
Hi everybody,
i need a help. I am explaining at details so that easy to understand.
I want a list of month and year based on the difference of month and year.
I am implementing search functionality based on Start month with year and end month with year.
So
start Selection - 01(month)-2009 (Yr)
End selection 10(month)-2009 (Yr)
so i ...
I have a table with this data:
Id Qty
-- ---
A 1
A 2
A 3
B 112
B 125
B 109
But I'm supposed to only have the max values for each id. Max value for A is 3 and for B is 125. How can I isolate (and delete) the other values?
The final table should look like this :
Id Qty
-...
Hello everyone, wondered if you can help me with a php/query question.
I want to format the first row differently to the rest of the rows (always 20 returned).
My query looks like this right now:
<?php
$nt=array();
$query="SELECT * FROM table WHERE field=item ORDER BY date DESC LIMIT 20";
$rt=mysql_query($query);
echo mysql_error();
...