Hi, I'm trying to skip an INSERT in a particular case, where one of two involved values is a specific value:
// this can work if Beech allready exists
INSERT IGNORE INTO my_table (col_wood_name, col_type)
VALUES ("Beech", 0)
// this should be skipped if Beech allready exists with col_type = 1
INSERT IGNORE INTO my_table (col_wood_name,...
Hello,
From the middle of a script I've been able to isolate a (very sudden) issue with querying some data from MySQL using PHP. Using the same connection within the same API in the past, I have been able to do numerous (millions of) individual INSERT queries in the past. Also, I've been able to return and manipulate large SELECT resu...
Hey Friends
How we can do Full Text Search in InnoDB?
...
I am looking to make my web app adjust itself depentent on the mysql serves load. To do this I am using this query.
SELECT (COUNT(*)-1) P.QUERYCOUNT, SUM(P.TIME) QUERYTIME
FROM information_schema.PROCESSLIST P
WHERE P.COMMAND = 'Query'
However it does not make much sense for all the active sessions to run this query incrementally. Ins...
I have an array, $scans. I want to query MySQL with all the values in that array and get my results back in an array. For example, sample data in scans would be:
E1234
E2244
E3654
The MYSQL table PARTS has fields part, size, length, plate, side, type.
I want to end up with $output["E1234"][0] to be the size result for that part, 1 t...
I have a table of destinations ( states ) which contain primary level categories and subcategories for activities. My ultimate goal is to output xml navigation links so I can link to:
Each destination permalink ( ordered alphabetically by destination slug name )
Each category underneath
Each subcategories underneath the category
The ...
Hi all,
I'm a noob at C++ and MySQL and I only want to retreive a xml file stored as a longblob in MySQL. I did a SELECT query to get the content and after I store this content in a xml file with std::ofstream. With this i get:
<?xml version="1.0" encoding="UTF-16"?> <AnObject noNamespaceSchemaLocation...
instead of this:
<?xml vers...
I wonder how to backup (dump) a Solr database?
If it is only to copy some files, then please specify which files (filename, location etc).
Thanks
...
So i have a site that I am working on that has been touched by many developers over time and as new features arised the developers at the time felt it necessary to just add another query to get the data that is needed. Which leaves me with a php page that is slow and runs maybe 70 queries. Some of the queries are in the actual PHP file f...
i am working on a project in php.
When we post something on twitter, i want to grab the users who have re-tweeted my tweet and store it in my database. I want to work in php and mysql.
If I post a question on my tweet, i want grab the answers and save the userinfo of all the users who gave the right answer.
Any suggestions on how t...
Hey Friends,
I'm using a table named "url2" with tje MySQL InnoDB Engine. I'm having so many data with full HTML of a Page, URL of the page, and so on.... When I use the following SQL query I am getting lot of results:
SELECT url FROM url2 WHERE html LIKE '%Yuva%' OR url LIKE '%Yuva%'
The search term yuva can be changes as user requ...
hello, I have noticed a problem with "non-english" (polish) characters using MySQL.
query "select 'abcde'='ąbćdę'" returns "1" and the strings are not equals ...
could you help me ? :) thx!!!
...
The following SQL statement works in MySQL but not with Oracle:
SELECT *, MAX(COLUMN_A)
FROM table_xyz
WHERE COLUMN_A <= 100
GROUP BY COLUMN_A
Oracle complaint: "FROM keyword not found where expected"
...
What is the best database model to store user visits and count unique users using the IP in a big database with 1.000.000 rows for example?
SELECT COUNT(DISTINCT ip) FROM visits
But with 1.000.000 diferent ip's it can be a slow query. Caching will not return the real number.
How big stats systems counts uniques visits?
...
Hi,
How to determine what are the tables locked using mysql?
...
A quick question. I have a simple table with this structure:
USERS_TABLE = {id}, name, number_field_1, number_field_2, number_field_3, number_field_4, number_field_5
Sorting is a major feature, one field at a time at the moment. Table can have up to 50 million records. Most selects are done using the "id" field, which is the primary k...
myqueryset = Content.objects.filter(random 100)
...
How can we find percentile, skewness and kurtosis in MySQL?
Is there any formula?
I want to find the above three for a large number of data records.
Thank you,
J
...
I'm writing stored procedures for the first time, and it's not working. The trouble is I can't see a reason for it not to work.
I'm running it through phpmyadmin 2.8.2.4. My MySQL version is 5.1. Here is the first part of the query:
create procedure under_user_type (in original_post int, out user_type int, out user_id longtext)
begin
...
Hi all,
I think this is a simple question. We have a MySQL database with a DATE field, the date is stored in US format (2010-06-01).
In my PHP page where I'll display the date, I simply want to convert this date into a UK format (01-06-2010).
Any help and advice appreciated!
Thanks,
Homer.
...