Forum

Posts

RECENTLY INDEXED PROGRAMMING SOLUTIONS OF MYSQL


Help with getting users and unique comments per widget  

Given the three tables:WIDGETSid Continue Reading
Views : 117
Sunday 30th of December 2012

Getting records from Stored Procedures  

I have made an stored procedure like this: Code: DELIMITER //DROP PROCEDURE IF EXISTS `get_games_menu` //CREATE PROCEDURE `get_games_menu`(IN currplayer INT,OUT gameid... Continue Reading
Views : 135
Sunday 30th of December 2012

Complex SQL Query  

Hello guys!I need your help.This is my query in db mysql.My problem is the output of the query.I need:not repeat the values in the columns `hits1` and `hits2`: in output `hits2` i have in this case twice Celtic... Continue Reading
Views : 54
Sunday 30th of December 2012

Question about data types  

I'm moving from MS Access to MSSQL, and I have a question about data types.In my Access database, I had tables with columns of the following data types:Text (for short text entries)Memo (for long text entries)Number (numeric entries)Date/Time Continue Reading
Views : 73
Sunday 30th of December 2012

Need help for my tables  

Hi, I just want to ask because i am confuse with my three tables,..my question is..Is it possible to use the join query like the inner join,left join,outer join.,etc...in the 3 tables, as i know that when we use the inner join it must be the pk and fk,example:.. Continue Reading
Views : 62
Sunday 30th of December 2012

Multiple INNER JOINs  

Hi there,I have a catalogue database. The db contains products which are organised into sections, and categories. One product may exists in many sections and many categories.I am creating a search engine for the administrator to search for products. I am a little... Continue Reading
Views : 138
Sunday 30th of December 2012

Please verify my ER Diagram  

Hai folks,i am relatively new to this ER Diagram.i have assigned a new project in my work place. a small project.description :HR Creates Tasks and assigns to employees.Employees will execute them while keeping updates on the current progress. Continue Reading
Views : 61
Sunday 30th of December 2012

Important: Secure your SQL queries!!!  

I thought I'd better make sure that everyone is aware of a particular class of security vulnerabilities called malicious SQL code injections. While there are many other security vulnerabilities, these are particularly dangerous - left unchecked, a malicious user could access or... Continue Reading
Views : 54
Sunday 30th of December 2012

MySQL Too Many Connections Error on Shared Host Dilemma  

Hi All,I maintain a website for someone who has a large e-commerce shop that is growing year-on-year. The problem is, this Christams I fear it has become a victim of it's own success as we keep seeing the dreaded "SQLSTATE[08004] [1040] Too many connections" error, though if only... Continue Reading
Views : 211
Sunday 30th of December 2012

MySQL Too Many Connections Error on Shared Host Dilemma  

Hi All,I maintain a website for someone who has a large e-commerce shop that is growing year-on-year. The problem is, this Christams I fear it has become a victim of it's own success as we keep seeing the dreaded "SQLSTATE[08004] [1040] Too many connections" error, though if only... Continue Reading
Views : 50
Sunday 30th of December 2012

Unique string prevents duplicate rows  

Hello guys!I need your help.This is my query in mysql. Code: UPDATE `tblm`SET UniqueString = NULL;UPDATE `tblm`SET UniqueString = TRIM( REPLACE... Continue Reading
Views : 46
Sunday 30th of December 2012

Working weeks in the year  

Hi there.I need to distribute equally these five names for the working weeks in the year, excluding saturday, sunday and holidaysI need table with weeks of the year?Can you help me? Any suggestions?thank you Continue Reading
Views : 169
Sunday 30th of December 2012

get a rand created time between 2012-10-1 and now.  

i will use DATE_ADD,now if i want to get a rand time from 2012-10-1 to now,how should i do? Code: created=DATE_ADD( DATE_ADD( DATE_ADD( DATE_ADD( DATE_ADD( DATE_ADD(... Continue Reading
Views : 52
Sunday 30th of December 2012

which variable to use   

I have a confusion regarding defining variables in stored procedure . We can define variable in store procedure in two different ways .....DECLARE var1SET @var1I am confused because ...(a)why there are two ways to define a variable... Continue Reading
Views : 154
Saturday 29th of December 2012

how to write a select query with condition   

I want to pick students based on user input to a select query.Example:----------if input = -1 which means all students .. then I want to select all studentsif input = studentId then I want to select that specific student only. Continue Reading
Views : 141
Saturday 29th of December 2012

A question about indexes  

Hi, What is the best way to create indexes? ... I have a large table with approx 50 columns, 10+ Million RecordsI have a few queries that I will be running on the table, for example Continue Reading
Views : 129
Saturday 29th of December 2012

UNIQUE column type - assign identically-named entries to existing ID  

Hi,I am creating a database of theatre productions and currently have a very basic setup with the below tables:-productionprod_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,prod_name VARCHAR(255) NOT NULLtheatretheatre_id INT NOT NULL... Continue Reading
Views : 64
Saturday 29th of December 2012

[MySQL 5.0.45-community-nt] JOIN Syntax  

Hi all, I hope your help.I have this two tables in MySQL: Code: DROP TABLE IF EXISTS `tbl_1`;CREATE TABLE `tbl_1` ( `id` int(10) NOT NULL AUTO_INCREMENT, `MAC`... Continue Reading
Views : 93
Saturday 29th of December 2012

DATE range calucation optimization  

I would like to find out if someone can help me to optimize the date range calculation in the following query: Code: SELECT USERID, birthdayFROM membersWHERE birthday... Continue Reading
Views : 164
Saturday 29th of December 2012

[MySQL 5.0.45-community-nt-log] Update multiple rows  

Hello my friends, I need your important help.I tried this join query: Code: SELECT A.password, A.email, B.emailFROM tbl_login AJOIN tbl_ml B ON A.email =... Continue Reading
Views : 51
Saturday 29th of December 2012

Can't restore my backup file (SQLServer 2005)  

Hi everyone,This is how I backup:1. From right click menu on "Diary" database I select: "Tasks" and then "Backup";2. At the "Back Up Database - diary" window I select:a. "diary" at the "Database" scrolling list;b. Radio button "Database" at "Backup component"... Continue Reading
Views : 89
Saturday 29th of December 2012

Update using CASE query problem  

Hi guys!Rather than fool around in PHP, I'm attempting to do some conditional work in a query: Code: UPDATE venues_clientsSET ... Continue Reading
Views : 51
Saturday 29th of December 2012

Sending data from Flash to mysql php database  

Hello, I am new to php and phpMyadmin. I created my first database and find it really cool. I have a Wordpress website. I am thinking, of using phpMyadmin with Flash as3. I build a login and register page. I think visually it would look great! However, I am somewhat uncertain how you... Continue Reading
Views : 127
Saturday 29th of December 2012

Problem with JOIN query  

Hello guys!I need your help.I have tow table in MYSQL:tbl_login 5.739 rows, alias A;tbl_mailing_list 3.736 rows, alias BThe field to be related tbl_login (A) and tbl_mailing_list (B) is e`email`.I... Continue Reading
Views : 108
Saturday 29th of December 2012

Anyone with SOUNDEX() experience  

I'm trying to find some records based on property address. The property address string contains the numeric street number as well as street name. I've got it set to check within the exact state/city/zip combo and soundex(prop_address) must match, but its returning WAY too many results for my... Continue Reading
Views : 78
Saturday 29th of December 2012

Google using which types of database that's Robust in a few's second details..  

Hi Friend,Any one can you tell me Google "Which types of database using". Continue Reading
Views : 58
Friday 28th of December 2012

Trigger  

Hello.I need to create trigger that will run after select.I wrote this Code: DROP TRIGGER IF EXISTS `article_after_select`;DELIMITER $$CREATE ... Continue Reading
Views : 113
Friday 28th of December 2012

error creating user in SQL Server 2008  

Hi,I am trying to create a new login for my database and keep getting the following error when I try to run the script that contains the connection string:"dorknozzle is not a valid login or you do not have permission micorsoft sql server error 15007"I followed... Continue Reading
Views : 53
Friday 28th of December 2012

Whats wrong with this query  

Hai folksTable candiatescid | agency_code+++++++++1 | 32 | 33 | 24 | 15 | 36 | 47 | 48 | 1Table approvalscid++++++++++458i want to list * all the... Continue Reading
Views : 124
Friday 28th of December 2012

[MySQL 5.0.45-community-nt] Copy some data from one table on one server to another se  

Hi all.I have two MySQL servers on different location. I would like to copy some data from one table on one server to another server. And that process is automated and executed scheduled. Is it possible to do it with mysql ?My server side language is... Continue Reading
Views : 68
Friday 28th of December 2012