Hi ,
I need my following code to work.
I am trying to use a PHP Variable and also add a [charlist] Wildcard statement to it
Could some one please help figure out why it wont work.
Basically it works if i remove the [charlist] Wildcard but I need it to find all the letters which are in the PHP Variable
my code is as followed
LIKE ...
I am running the following MySQL query:
select * from combinations where family_type='f597';
on a table that has about 90,000 lines. If I run the query via MyPHPAdmin, it takes 0.3 seconds to run, but in my php page on the same host it consistently takes about 8 seconds.
To test the amount of time it takes in my page, I run it like ...
Hi Guys, I have a tables like this
Results
-------
id - autoincrement value
TestCase - varchar
Verdict - varchar
AppID - varchar
TestCases
---------
id - autoincrementr value
TestCase - varchar
TestCase_container - varchar
Basically I am displaying the results in php code. while displaying the ...
In MySQL, is it possible to have two tables linked by a foreign key and when a record is inserted into the parent table to create a corresponding record in the child table?
I have a website that handles member registrations. One table contains the member's details such as name and email address, and is linked to a settings table via mem...
Does anybody know how I could have, in a MySQL query, the same behaviour as the Regex.Replace function (for instance in .NET/C#)?
I need that because, as many people, I would like to count the number of words in a field. However, I'm not satisfied with the following answer (given several times on that site):
SELECT LENGTH(name) - LENGT...
I'm trying to port a database from SQL Server Express over to my MySQL database. I've made sure the SQL Express is running on port 1433 and all, and the MySQL Migration toolkit is even able to see the different databases/schemas I have in my SQL Server Express DB.
The problem is that MySql Migration toolkit won't let me press "next" un...
Hi,
I am exporting a csv file in to mysql db using load data infile syntax.
the date in csv is in 2009/10/31 7:8:57.0 format. Is there any way to convert this while loading to something like 2009-10-31 07:08:57 ?
...
my table is:
name | category |
name01 category01
name02 category01
name03 category02
name04 category02
name05 category02
name06 category02
name07 category02
.....
I would like to count for each category the number of name
the output i woulk like is something like this (by the example above):
category | num
category01 2
cate...
I have a table
car
id | person_id | mpg
------------------------
4 | 1 | 50
5 | 1 | 15
6 | 2 | 10
7 | 2 | 28
8 | 3 | 33
I need to get an average of each person's mpg and then an average for the group.
person 1 avg = (50 + 15) / 2 = 32.5
person 2 avg = (10 + 28) /...
Given two tables A and B in a MySQL Database, how can one update a field in a row of table A if and only if certain fields in the fore-mentioned row in table A exactly match fields in a distinct row of table B. The rows in table B must be used once and only once for each comparison. As such, a row in Table B that has fields matching a ro...
Hello. I have Two tables like this:
Table categories:
columns: id, name, parent
1, Foods, 0
2, Drinks, 0
3, FastFood, 1
4, Hamburger, 3
Table documents:
columns: id, name, categoryID
1, CheseBurger, 4
2, shop, 3
the parent column has the parent category's id. So When i want to delete Foods entry from categories, i want to delete all ...
Hi, I'm trying to select a number of elements from a mysql table based on their weight, example table being as follows.
Name | Weight
-------------
Bobo | 0.1
Jill | 0.3
Andy | 0.5
Dave | 0.9
Where weight is a float between 0 and 1.
What I would like to do is be able to select up to x rows based using the weight with a random facto...
What are some different ways to loop through a mysql result set? I'm new to PHP and MySQL so I'm looking for simple ways to loop through and an explanation as to how the provided code works.
...
When i try to get a dump of a mysql database, the dump stops when a row in it is updated. How can i prevent that? I already tried following options with no result:
-f (forces continu even when error)
-x (lock all tables)
when i log any error, i get nothing
Command i'm using:
mysqldump --user=* --password=* --all-databases --log-e...
Hi,
I need to connect to a MySQL database via C# express 2008. I think I got the code right apart from the connection string. I obtained this code from a forum but the connection string was for SQLExpress 2005. Can someone please help me on how can I fix this? Here is the code with the SQL Express connection string:
//string connection...
Hello,
For the longest time, I've been using MySQL servers to handle data (in JAVA, and in C#). But lately, I've been hearing good things about LINQ and SQL Server. I've been thinking of converting, but I don't know much about the SQL Server.
Could anyone who has used SQL Server before, please define how well it is compared to MySQL se...
Hi All,
I have a MYSQL database of photo galleries;
each row contains a field with the list of images included in that gallery, eg:
1,5,134,13,5
these are the IDs of the photos. The same image_id could be included in other galleries.
When I delete a photo, I need to remove the corresponding id from the galleries that contain it.
Wha...
Using MySQL 5
I have a table like this:
date (varchar)
door (varchar)
shift (varchar)
route (varchar)
trailer (varchar)
+ other fields
This table contains user generated content (copied in from another 'master' table) and to prevent the users from creating the same data more than 1x the table has a unique index created based on the f...
Hi,
I was wondering what people's experiences have been when creating a mysql function that calls a shared object, in mysql 5.0. Specifically, I want to be able to call a java class; which I assume would use jni.
Thanks!
...
I have a data model that includes element types Stage, Actor, and Form. Logically, Stages can be assigned pairs of ( Form <---> Actor ) which can be duplicated many times (i.e. same person and same form added to the same stage at a later date/time).
Right now I am modeling this with these tables:
Stage
Form
Actor
Form_Actor
______...