mysql

Update the rank in a MySQL Table

I have the following table structure for a table Player Table Player { Long playerID; Long points; Long rank; } Assuming that the playerID and the points have valid values, can I update the rank for all the players based on the number of points in a single query? If two people have the same number of points, they should tie...

MySQL - Finding time overlaps

Hi, I have 2 tables in the database with the following attributes: Booking ======= booking_id booking_start booking_end resource_booked =============== booking_id resource_id The second table is an associative entity between "Booking" and "Resource" (i.e., 1 booking can contain many resources). Attributes booking_start and booking_en...

Can MySQL do row level security or what Oracle calls virtual private databases?

Does MySQL have any equivalent feature to Oracle's virtual private databases in 10g. It is also known as row level security. I prefer not to implement anything like columns and triggers. I am looking for a solution similar to Oracle's. ...

Would you use one or two tables for username and password?

Is it any safer to create a table holding user information and another one for their passwords than using the same table for everything? ...

mysql and linq support

Hi All, I have read in many forums that there is no good linq for mysql (free) but his forums are 2 years old. In the meantime is there any good free linq for mysql ? Hog good is for professional use? Regards ...

i have two tables in my sql database of 1 million records, is there a way to find out the non matching data.

i have two large tables in a database. table 1 with 2 fields rank,name and table2 with 2 fields rank,name. both are of 1 million records. can you write php sql code to fetch those records which exists in table2 but does not exist in table1. ...

What is the best PHP MYSQL wrapper?

I've bounced around between different wrappers, my own, and using straight php mysql functions over the years but I'm sure there's a really good solution out there. What is it? :) EDIT: Only needs to connect to MYSQL. ...

Where does the mysql database files actually reside?

Hi, Im just curious as I am beginning to learn php and mysql, as to where the database and other files of mysql reside on the hard drive. I have installed wamp on a windows xp sp2 platform. ...

genrating xlsheet with mysql but also contains html code in xl sheet need remove html code

following is the code for getting xlsheet from mysql ?php if($_POST['Submit']=='Generatexml') { $tblname=$_GET['genratexml']; //mysql_connect("localhost","root",""); //mysql_select_db("hitnrunf_db"); global $obj_mysql; $result = mysql_query("SELECT * FROM tbl_js_login"); while($row = mysql_fetch_array($result)) { $csv_outp...

[WEB] Local/Dev/Live deployment - best workflow

Hello, situation We our little company with 3 people, each has a localhost webserver and most projects (previous and current) are on one PC network shared disk. We have virtual server, where some of our clients' sites and our site. Our standard workflow is: Coder PC → Programmer localhost → dev domain (client.company.com) ...

Equivalent of Oracle’s RowID in MySQL

is there an equivalent of oracle's rowid in mysql? delete from my_table where rowid not in (select max(rowid) from my_table group by field1,field2) I want to make a mysql equivalent of this query!!! What i'm trying to do is, : The my_table has no primary key.. i'm trying to delete the duplicate values and impose a primary key (compo...

Generate MySQL data dump in SQL from PHP

I'm writing a PHP script to generate SQL dumps from my database for version control purposes. It already dumps the data structure by means of running the appropriate SHOW CREATE .... query. Now I want to dump data itself but I'm unsure about the best method. My requirements are: I need a record per row Rows must be sorted by primary ke...

why this query result return wrong id ,name

select id,name,type,MAX(vote) as maxvote from channelsvote group by type ...

Multiple values one field mysql

Basically I have a a mysql database which i want to create containing the following tables: artist song album A song can belong to only one artist, however, a song could be in Multiple Albums. How would I go about implementing this in my mysql database. I've been stuck for a few days now :( ...

NULL in table fields better than empty fields?

i wonder if one should have NULL in the fields with no value, or should it be empty? what is best? thanks ...

How to know about MySQL 'refused connections'

Hello, I am using MONyog to montitor my two mysql servers. I get alert emails from MONyog when something goes wrong. There is an error I could not find out why. It says: Connection History: Percentage of refused connections) - 66.67% the percentage is not important, this is just about having refused connections. I get this email e...

MySqlDateTime to System.DateTime conversion

Ok I'm very new to databases and C# in general, but I'm using a piece of code that exports dataset data to an Excel file, and its taking issue with the date/time format. I'm using the MySQL connector so the rowtype is MySql.Data.Types.MySqlDateTime. Is there any quick way to convert it into System.DateTime so I can slot it straight into ...

mysql query problem

hey everybody i'm trying to do somthing simple like this SET i = 0; WHILE (i <= 2230686) DO INSERT INTO `customers`(`check`) VALUE(0); SET i=i+1; END WHILE; in the phpmyadmin SQL query box and it doesntwork and the mysql doesnt throw an understandable reason any clues ? ...

Encoding issue with form and HTML Purifier / MySQL

Driving me nuts... Page with form is encoded as Unicode (UTF-8) via: <meta http-equiv="content-type" content="text/html; charset=utf-8"> entry column in database is text utf8_unicode_ci copying text from a Word document with " in it, like this: “1922.” is insta-fail and ends up in the database as â��1922.â�� (typing new data into the...

How to export an SQL-Database

in phpmyadmin to my local disk? I don't see a field where I can specify the destination. ...