Hi,
I have around 4 years experience of ASP.NET & SQL Server (only web forms). I have a little knowledge of Ruby on Rails and have developed one very small 2-3 pages application in ASP.NET MVC in my job. Now I and one of my friend ( same experience like me) are willing to gain more experience of ASP.NET MVC. For that purpose we have thou...
How do I drop all empty tables from a MySQL database leaving only the tables that have at least 1 record?
...
Is it possible to rename a MySQL table? If so, how?
...
Does anyone know of a MySQL query that returns the server's current load average?
...
In MySQL, how can I compare two strings and get matching percentage. Something like this:
compare(needle, haystack) = percentage
compare("foo", "food") = 0.75
compare("foo", "foobar") = 0.5
compare("foo", "foofoo") = 1.0
compare("foo", "fo") = 0.0
I hope you get the idea :)
...
Hello,
I have a specific row in my database, with the following information:
data:
user_id start_time end_time
405 12:00:00 14:00:00
I have the following SELECT statement:
SELECT *
FROM data
INNER join users on users.user_id = data.user_id
WHERE NOT EXIST...
I'm trying to do a MySQL request to retreive a 2 level menu (parent and children)...
There's only 1 table, of course :
idCategory | Title | idCategoryParent | DisplayOrder
1 | cat1 | NULL | 1
2 | sub-cat1 | 1 | 1
3 | sub-cat2 | 1 | 2
4 | cat2 | NUL...
I'm trying to get my full text search (in boolean mode) to retrieve words with three letters or less.
Currently, if I search for something like "NBA", I don't get any results.
However, if I append the wild card operator "*" to the search term, I get results.
I also read that you could remove the three word limit in my.ini, but I'm won...
I'm a SQL Server guy experimenting with MySQL for a large upcoming project (due to licensing) and I'm not finding much information in the way of creating a primary key without a clustered index. All the documentation I've read says on 5.1 says that a primary key is automatically given a clustered index. Since I'm using a binary(16) for t...
Here is my situation: I have about 50 different fields of data that I need to store for 1 record (none are the same or repeating). About 15 of the fields are ones that I commonly need to use in queries, while the remainder are used on occasion (~40% of the queries).
Should I setup 2 tables, one containing the common fields and the other...
I am trying to build an iPhone application using core data's built in table management. I want synchronize the data with an MSSQL or MySQL database. Core data is compatible with SQLite so I thought it might work as a bridge. Can anyone think of how one might achieve this functionality?
...
Hello I have an array $name[] that I am trying to insert into the second field of my table but it's not working (table remains completely blank). I cannot find the error in my code what am I doing wrong?
$username="us";
$password="pw";
$database="db";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "err...
Which is the better way of retrieving multiple rows?
select *
from order_details
where order_id in (1,2,3, ... .... )
...or:
select *
from order_details
INNER JOIN orders on orders.id = order_details.order_id
INNER JOIN customers on customers.id = orders.customer_id
where customers.id = 3
...
Hello,
I currently have the following row in my table:
course_data:
user_id days <-- This is a varchar column.
405 1,3,5
and I am trying to implement the following SELECT statement:
SELECT usrID, usrFirst, usrLast, usrEmail
FROM tblUsers
WHERE usrID NOT IN
(
...
My goal is to achieve a list of parent categories from a nested category the easiest way. Say if I had a site that sold a variety of different products, one of which is a quad core pentium. A feature that I'd be able to display on my webpage is as follows:
Electronics > Computers > CPU's > Intel > Intel Quad Core
The category table tha...
Here is the snapshot of the query that doesn't work since I added the Union.
SELECT fin05_usager.idUsager,
(SELECT sum(nombreReputation) as nombreReputation
FROM (SELECT SUM(nombreReputationGagner) as nombreReputation
FROM fin05_usager_reputation
WHERE fin05_usager_reputation.idUsager =...
I have a C program that mines a huge data source (20GB of raw text) and generates loads of INSERTs to execute on simple blank table (4 integer columns with 1 primary key). Setup as a MEMORY table, the entire task completes in 8 hours. After finishing, about 150 million rows exist in the table. Eight hours is a completely-decent number fo...
I just updated php to 5.3 and can no longer connect to my remote mysql server. I get the following errors:
mysqli_connect(): OK packet 6 bytes shorter than expected
mysqli_connect(): (HY000/2000): mysqlnd cannot connect to MySQL 4.1+ using old authentication
It seems this has to do with the new mysqlnd driver. Is there a way to force ...
Hi,
I have an issue with PDO that I'd really like to get an answer for after being plagued by it for quite some time.
Take this example:
I am binding an array of ID's to a PDO statement for use in a MySQL IN statement.
The array would be say: $values = array(1,2,3,4,5,6,7,8);
The database-safe variable would be $products = implode('...
I'm used to MSSQL's Query Analyzer. Needing to convert some SP's for a hobby project, I'm having trouble making the transition to the mysql query browser, particularly when it comes to using variables. I'm essentially trying to simulate a procedure before it's a procedure.
So in Query Analyzer i'd write something like this...
delca...