We have three tables:
p:
<`
+-----+-------+-------+--------+--------+
| pno | pname | color | weight | city |
+-----+-------+-------+--------+--------+
| p1 | nut | red | 12 | London |
| p2 | bolt | green | 17 | Paris |
| p3 | screw | blue | 17 | Rome |
| p4 | screw | red | 14 | London |
| p5 | cam |...
hello ,
6 months ago , i was asked to make a database access for our project that has around 30 tables ,( using the Data transfer object pattern ) . we were using Microsoft's sql server back then. so i had to write a script that automatically generates the DAO's and DTO's.( automatically build classes, name them appropriately according...
I am looking for a way to estimate how much extra storage will be needed if a MySQL TEXT column gets a fulltext index.
Intuitively speaking the size of the fulltext index is dependent on the total length of text but what exactly is affecting it?
...
I'm using parameterized queries with PHP I have the following two queries:
SELECT username,question_text
FROM questions,users
WHERE questions.question_id = 4 AND questions.user_id = users.user_id
and
SELECT username, post_text
FROM posts,users WHERE posts.question_id = 4
AND posts.user_id = users.user_id ORDER BY posts.post_id AS...
Not sure really where to start with this one. Can anyone help/point me in the right direction.
I have a timestamp column in MySQL and I want to select a date range for example, all timestamps which are in Oct 2010.
Thanks.
...
I have a MPTT organized MySql database which i need to display , there is no level limit and i can't alter the database, i've tryed http://dev.mysql.com/tech-resources/articles/hierarchical-data.html, but still got me a few headeachs.
...
Hi All,
Need a help in building query. I have quantity_price table, listing quantity and corresponding price as shown below
Quantity Price
----------------
1 -- € 175,35
2.5 -- € 160,65
5 -- € 149,10
10 -- € 143,85
so for upto 1 quantity price will be 175,35 up to 2.5 it will be 160,65 and so on. For more than 10 quantity...
I have a Asp.net web service that I connect to and that insert, update or delete max 30 rows in a large MySql table using transaction to make the process faster. The whole process should just run in a few secs. Sometimes I can see in the logs that the user gets error:
Timeout expired. The timeout period elapsed prior to completion of th...
I am using PHP and Mysql for developing an application. we have two copies of database, one at local server(i.e our end) and one at web server. we want to sync both the database so that if any change made in local database should also reflect on the webserver database. is that possible??
Currently we are using PHP scripts to do so..which...
Is there a way to make this statement into one? The basic idea is to insert a tag name if it doesnt exist and to retrieve the primary key for my next statement. title column is unique.
INSERT INTO `tag_name` (`count`, `title`)
SELECT 0, @title FROM DUAL
WHERE not exists
(SELECT * FROM `tag_name` WHERE `title` = @title LIMIT 1);
...
Hello,
In my mvc asp.net application, I have various modules in that I have insert and edit functionality.
Some time I am getting this error:
at System.Data.EntityClient.EntityTransaction.Commit() at
System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options) at
System.Data.Objects.ObjectContext.SaveChanges() at
admin.ch...
So, LIMIT 50000,1 won't work well? Then, how come? What to do if rows after several rows are required?
I read it at http://www.mysqlperformanceblog.com/2006/09/01/order-by-limit-performance-optimization/
...
Here is line 37;
$write = mysql_query("INSERT INTO `trial' VALUES (" '', '".$ip."', '1' ") or die(mysql_error());
The error may be coming from further up.. But I'm not quite sure :S
I am trying to block the ip of a
...
I'm using RedBean PHP ORM 1.2 with Zend and Mysql for a new project. I'm still in the process of learning it and it works very well for many scenarios, except i cant find how to load beans related by foreign keys. Allow me to explain.
I have two tables; members and feeds. Each 'feed' is linked via a foreign key (in MySQL) to a member. T...
Hi
I have a large sql file < 600 MB.
This files is backup for forum and I want to upload it to empty db.
How I can upload it??
I can't use PHPMyAdmin? and I used BigDump and it doesn't insert all tables.
How to do it?? Is there any other way?
Thanks
EDIT : I don't have access to command line, I just have my CPanel
...
Using MySQL I can run the query:
SHOW CREATE TABLE MyTable;
And it will return the create table statement for the specificed table. This is useful if you have a table already created, and want to create the same table on another database.
Is it possible to get the insert statement for an already existing row, or set of rows? Some ...
Hi there,
I'm searching for a multiuser web-based calendar system that supports multiple users.
I'm looking for these features:
Multiple users
Two user groups: First group is allowed to see events, the second group can create and edit events
The events should be stored in a mysql database or a file
The system has to be (very) easy to ...
How can I tell MySQL to format a timestamp as a readable date before outputting a query result in a MySQL client/console?
...
hi there,
I'm currently working on a closed-source commercial web-project which uses MariaDB as database. I wonder about the licensing of MariaDB. Does anybody know, if we had to get a license to use it with our commercial project? On the website, they mention the "GNU General Public License, version 2". What means that exactly?
http://...
im currently running multiple mysql querys but want to just run one and loop through it. how can i improve this
$query = mysql_query("SELECT productid, code, size, quantity, sizechart, rprice, price, weight FROM inventory WHERE code = '$productcode1'");
while ($rows1 = mysql_fetch_array($query))
{
$productids1 = $rows1['productid']...