I'm using MySQL in an ASP.NET project I'm currently working on, I did some tests to test the performance of the MySQL .NET provider but unfortunately I'm not very pleased with the results.
A very simple loop that only opens the connection was 10x faster in SQL Server:
// MySQL
const string CONNECTION_STRING =
"server=localhost;databa...
People have different ideas of how to search for the same term.
For example Tri-Valley, Trivalley, Tri Valley (and possibly even incorrect spellings)
Currently that search is done like this
SELECT * FROM `table` WHERE `SchoolDistrict` LIKE '%tri valley%';
Is there an easy way to say 'space dash or no space' without writing out three...
I know this is something of a "classic question", but does the mysql/grails (deployed on Tomcat) put a new spin on considering how to approach storage of user's uploaded files.
I like using the database for everything (simpler architecture, scaling is just scaling the database). But using the filesystem means we don't lard up mysql w...
Hello,
After following this recommendation regarding tags tables structure, I've implemented the following design:
Table: Item
Columns: ItemID, Title, Content
Table: Tag
Columns: TagID, Title
Table: ItemTag
Columns: ItemID, TagID
I'm facing another problem, I wanna display the number each tag appears in the system. What's the best ...
Hi,
I'm in the middle of adding a tagging system to my website. I want to be able to easily add/edit items tags.
My current tags table structure is:
Table: Item
Columns: ItemID, Title, Content
Table: Tag
Columns: TagID, Title, Tag_Counter
Table: ItemTag
Columns: ItemID, TagID
I really like the implementation of the tagging in Stac...
Hi!
I want to upload a large file of size 10M max to my mysql database. Using .htaccess i changed the PHP's own file upload limit to "10485760" = 10M, i am able to upload files upto 10M size without any problem.
But i can not insert the file in database if it is more that 1M in size.
i am using file_get_contents to read all file data ...
Hi!
I want to upload a large file of size 10M max to my mysql database. Using .htaccess i changed the PHP's own file upload limit to "10485760" = 10M, i am able to upload files upto 10M size without any problem.
But i can not insert the file in database if it is more that 1M in size.
i am using file_get_contents to read all file data ...
I have a new database, similar to the old one but with more columns and tables. So the data on the old table is still useable and needs transferring.
The old database is on a different server to the new one. I want to transfer the data from one database to the other.
I have navicat, but it seems to take forever using the host to host d...
We have a system that has a Mysql database with about 2Gigs of data.
The PC application that talks to the database has just been updated.
There are a number of tables whose structure have changed and we need to run a conversion script.
The system is only used in office hours
Question:
What is the best approach to doing this upgrade...
I have a table called PROJECT_CATEGORY and it contains two fields
cat_id and cat_title
I am storing the cat_id in another table called PROJECTS so:
project_category.cat_id = projects.cat_id
What is the best way using MySQL to run a query to show the cat_title. In other words I want to display the name not the ID number of the table. ...
Currently the major means of connecting Flash AS2/AS3 to a MySQL database are:
Flash > PHP > MySQL -- "secure code" in PHP Scripts
Flash Asql or Assql > MySQL -- "secure code" in MySQL Stored Procedures
The second approach is newer, but directly connects to a MySQL DB using binary sockets and ByteArrays.
In which case would the "sec...
Can I use a trigger in MySQL to create a new database when a value is inserted into another database.
...
Hi,
I'm running into a problem where it is possible to insert a row into a table whithout specifically setting an INT NOT NULL column (defaults to 0 which is invalid for my purposes)
I create the table this way:
CREATE TABLE inventorycontrol (
ID INT NOT NULL UNIQUE AUTO_INCREMENT
,nodeID ...
Hello,
I have this partial code:
if ($getRecords = $con->prepare("SELECT * FROM AUCTIONS WHERE ARTICLE_NO = ?"))
{
$getHtml = $con->prepare("SELECT ARTICLE_DESC FROM AUCTIONS WHERE ARTICLE_NO = ?");
$getHtml->bind_param("i", $pk);
$getHtml->execute();
$getHtml->bind_result($ARTICLE_DESC);
$getRecords->bind_param("i", $pk);
$g...
Background
I'm currently developing an online community and I want to store some temporary information in a hash table. Currently this information is being stored in memcached, however, should the memcached service need to be restarted or failed, I would like to resort back to the on disk hash/cache.
The Question
What is the most effe...
Hello all,
I'm lousy at SQL queries so this may be a silly question. However, here is roughly what i'd like to do:
table corpuses //stuff i'd like to search thru
title
body
...
table searches //list of search terms to be applied to corpuses
term
...
The query i'd like to write is more or less as foll...
I'd like to populate the homepage of my user-submitted-illustrations site with the "hottest" illustrations uploaded.
Here are the measures I have available:
How many people have favourited that illustration
votes table includes date voted
When the illustration was uploaded
illustration table has date created
Number of comments (n...
Hi basicly I am trying to create a simple IF statement that shows a default picture if one hasn't been entered in to my database. I am using server to store my picture and a database to store the file name, so I can get the image to display if it has a file name in the db but I want the If statement to say if the record is empty display ...
I'm working on a framework in PHP, part of this frameworks job is to write SQL code to generate new MySQL columns.
What is the most elegant way to pass in a bunch of parameters for a column and then turn that into SQL code? As an example here is some YAML I have, that specifies parameters for creating a varchar column:
- type: characte...
I am interested to offer both hosted and SaaS version of my application. Now, SOers suggested that I map the URLs to MySQL databases. What I can think of is something like this
companya.mysoft.com will have the MySQL database that starts with the name companya*. i.e., compana_mydb
companyb.mysoft.com will have the MySQL database that s...