Tag: mysql

MySQL get average from result, average must be between 8 and 12

So I am trying to create an MySQL query to get the average of the RANK id, and it must be somewhere between 8 and 12, otherwise the query will select 5 random player names until the RANKVALUE is averaged between 8 and 12. select summonername from (select rankvalue from players group by summonername having […]

Select min value with specific where filters MYSQL

I have a little trouble with my subquery. I try to only take the nearest event in a table with a min value, but I need it to be confirmed (confirmed = 1 and cancelled = 0) There’s my table : uid | location | date | open | close | confirmed | 1 | […]

Error in SQL syntax Can seem to find the right query

Im having trouble I cant seem to make my sql query right Dim command1 As New MySqlCommand(“UPDATE userscanner SET Username ='” & txtbox_username.Text & “‘,Password='” & txtbox_password.Text & “‘ WHERE ID = ‘” & lbl_id.Text & “‘)”, Connection) command1.ExecuteNonQuery() MsgBox(“Profile Successfuly Saved”) Me.Close() but i have a error that says ” you have an error […]

Migrate a Trigger from MS Sql TO MySql

I would like to convert this MS sql trigger to MySql.My issues are: NOT FOR REPLICATION : update() function: I don’t have any idea how to add that same functionality in MySql.Following is the SQL Server Trigger code.please help. CREATE TRIGGER [trigger_name] ON [dbo].[table_name] for INSERT,UPDATE NOT FOR REPLICATION AS BEGIN SET NOCOUNT ON; if […]

Collation issue with linked servers SQLServer and MySql and Incorrect String Value

Setup Have an SQL Server connecting to Mysql as a linked server. Periodically a SQL Server Agent Job calls a stored procedure (SP) to check a flag in a SQL Server table, pass the contents (via a temp table) of unflagged rows to a SP in the mySQL db, flagging the original SQL Server records […]

Implement an efficent mechanism to check whether a record is referenced in other tables before delete

I am developing an web app using asp.net. I am making this app for compatable for both SQL and MYSQL DB. So my concern is think that I have a set of records in a table. This table’s records are referenced by other tables. So if a user try to delete a record from this […]

Temp table to get the value from a Table using UNION

I HAVE a table name Book , Statement, Chapter, Section, Post. The Post table has a Column name DisplayMessage which i need to get a distinct record of. 2 ways it can be mapped in UI First way is Book , Statement, Chapter, Section, Post. OR Book , Statement,Chapter, Post. (Post has the Column “Message”) […]

Which method I use for get each computer ip address

We have 50+ computers in our office and each computer have separate Internet connection from local service provider. Now in our website we want to get each computer information(I don’t know without ip have any other ways) at the time of user registration. So as a normal method we used $ip = $_SERVER[‘SERVER_ADDR’]; but it […]

Python connection to server and interact with database

I have question how can I connect to VPS server and interact with MySQL database using python on my local machine. I would like to make program using PyQT that connect to my server and update, take sth from db. I know that there is MySQLdb module but from what I know i cannot connect […]

MySQL to MSSQL synchronization

I am trying to synchronise the data from MySQL to MSSQL. Since my access on MySQL is limited to Read only I am trying to figure out how to sync the data between them. I tried the DBConvert software which is good only for the initial replication. I know also about linked servers in SQL […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.