I am doing a project in MySql. At the presentation, I am curious what kind of questions the professor could ask me? If you know the answer, plz post that too. Thanx.
...
I've got a table, called faq_questions with the following structure:
id int not_null auto_increment,
question varchar(255),
sort_order int
I'm attempting to build a query that given a sort order, selects the row with the next highest sort order.
Example:
id question sort_order
1 'This is question 1' 10
2 'Th...
I'm the developer of twittertrend.net, I was wondering if there was a faster way to get headers of a URL, besides doing curl_multi? I process over 250 URLs a minute, and I need a really fast way to do this from a PHP standpoint. Either a bash script could be used and then output the headers or C appliation, anything that could be faster?...
I have a MySQL query structured as follows:
SELECT time(c.start_time),
time(c.end_time),
time(c.end_time) - time(c.start_time) as 'opening_hours'
FROM my_shop c;
The data in start and end time is 1970-01-01 07:00:00 and 1970-01-01 19:00:00 respectively.
On my local machine this this query returns:
| 07:00:00 | 19:00:0...
Note: Using MySQL 4.0, which means no subqueries (at present).
I have 2 tables:
A "user_details" table
A "skills" table, which has the user_id and a "skill_id", which maps to a predefined set of skills defined elsewhere.
The current query allows an admin to search for users by selecting skills, and the query works in an OR fashion, ...
I have, as best as I can manage, set up IIS (6.0), PHP (5.2.8) and MySQL (5.1.30) on Windows Server 2003, with all the involved mucking about (I think) in IIS and PHP to get things talking to each other.
PHP does work - however, I cannot use the mysql or mysqli libraries from a PHP page.
Fatal error: Class 'mysqli' not found in...
Fata...
I'm using MySQL replication, and I'd like a status script running on the slave to report the last statement that was replicated over to the slave.
I can use "SHOW SLAVE STATUS" to get the current read and execute positions. But how do I use that information with mysqlbinlog to read the last entry? Assuming the slave is caught up with ...
My requirement
A table needs to maintain a status column.
This column represents one of 5 states.
initial design
I figured I can just make it an integer column and represent the states using a numeric value.
0 = start
1 = running
2 = crashed
3 = paused
4 = stopped
Since I don't want my app to maintain the mapping from the integer...
Consider a simple table with an auto-increment column like this:
CREATE TABLE foo
(
`fooid` bigint unsigned NOT NULL auto_increment,
....snipped.... other columns
PRIMARY KEY (`fooid`)
)
ENGINE=InnoDB AUTO_INCREMENT=10
How does one redesign this so that we don't hit the max of the bigint datatype ?
The unsigned range is 0 to ...
Which is the best, user-friendliest performance tool for MySQL? I'd like help with pinpointing the bottle neck of my setup. Is the problem in the SQL statements, the settings variables, or something else?
...
Hi! Is there any standalone alternative to activerecord-like migrations. Something like a script that is able to track current schema version and apply outstanding migrations. Basically, these migration files could be just a plain SQL files, something like:
[timestamp]_create_users.sql
reverse_[timestamp]_create_users.sql
Language of...
hi
I am calling 4-5 scripts from a file at once.
But I need to give only one input to the file in the first sql that I am calling.
That input will be the input for all the other sql files I have called after the first one.
Is there any way to do that?
please help.
...
I'm having difficulties to answer this question. Can someone help me?
Discuss the benefits of MYSQL and explain why it is gaining acceptance as the RDBMS of choice for many organizations worldwide.
...
How would I Export tables specifying only certain fields?
I am using mysql 5.0 - using either a sql command or mysqldump.
My table is X, and the fields I want to export are A,B,C
...
I need to query the table for "all but keyword". Using just "-" doesn't work, and in fact mysql manual says:
Note: The - operator acts only to
exclude rows that are otherwise
matched by other search terms. Thus, a
boolean-mode search that contains only
terms preceded by - returns an empty
result. It does not return “all row...
Question: How can I process a form using jQuery and the $.ajax request so that the data is passed to a script which writes it to a database?
Problem:
I have a simple email signup form that when processed, adds the email along with the current date to a table in a MySQL database. Processing the form without jQuery works as intended, addi...
Hey everyone,
Does anyone know a good (preferably open source and cross platform) tool to allow simple visualization of mysql databases? I just need a tool I can quickly point at a database and it'll show basic table structure and field types, etc. Nothing too advanced or crazy.
...
I have three tables. This query will write down the right answer (x-lines for btv.id_user with appropriate btv.cas and race.id_zavod
SELECT `btv.id_user`, `btv.id_zavod`,`btv.cas`
FROM `btv`
JOIN `btu` ON `btv.id_user` = `btu.id_user`
JOIN `race` ON 'btv.id_zavod' = `race.id_zavod`
WHERE `race.type` = '8' AND `btv.id_user` = '607'
Res...
Hi, does anybody know some free tool for synchronization MySQL database (data and structure) like in Navicat for Windows ?
...
I have an SSIS package that connects to a mysql server and attempts to pulls data from different tables and inserts the rows into a SQL Server 2005 database.
One issue i notice is that at any given time it runs, regardless of what step it is on, it almost always fails to bring in the total records from mysql into sql server.
there are ...