- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
70 Posted Topics
Re: As the Error Says 3306 is being used by some other application user netstat to find out which application is using it or try turnning off firewall if any or else you have to use different port for Mysql | |
Re: [QUOTE]SELEC tb1.Name, SUM(tb1.Salary + tb2.Bonus) Total From tb1, tb2 WHERE tb1.Name = tb2.Name group by tb1.Name order by Total[/QUOTE] SELECT is missing "T" query will give correct results | |
Re: what file upload size r u talking about?? R u talking about data packet size? | |
Re: [ICODE]select leave_Type,emp_Leave_From,emp_Leave_To,emp_Leave_Days from leave_details inner join leave_eli on leave_details.leave_Type_Id=leave_eli.leave_Type_Id inner join leave_cri on leave_cri.leave_Type_Id=leave_details.leave_Type_Id[/ICODE] | |
Re: [code] select user from mysql.user where user=' '; [/code] you should have access to mysql DB to execute the query | |
Re: use mysql migration tool kit it free and can be downloaded from mysql site | |
Re: [CODE]SELECT Room.RoomNo, Room.TypeHotel FROM Room, Hotel, Booking, Guess WHERE Hotel.HotelName='Hillton' AND Booking.GuestNo=Guess.GuestNo AND Guess.Guestno is NULL;[/CODE] Instead of Guess.Guestno=NULL; use Guess.Guestno is NULL; | |
Re: why don't you try inserting subscription_end by computing value before firing insert as you will have registration_date value you can compute subscription_end by DATE_ADD(registration_date, INTERVAL 6 MONTH) | |
Re: if you say there are identical acct_no in both tables then why are using trim function To isolate your problem try selecting from both the tables by passing acct_no | |
Re: if you are using mysql 5.1 versions then u can query general_log table to get the execution time i dont think we can do it in Mysql 5.0 or lesser versions if you got any thing show us some light | |
Re: [ICODE]INSERT INTO TempTime1 (NOM,Tday,Ttime,Ttindex) SELECT * FROM time1 WHERE days AND times NOT IN (SELECT * FROM timetable1_1)[/ICODE] Few things to note here you are inserting values into 4 columns of TempTime1 table with select * from time1 where time1 has more than 4 columns,so that's a error and the … | |
Re: Try this : [QUOTE]update news set content=concat(content,' <br>Aproved by Admin');[/QUOTE] | |
Re: work around would be to Create a column CaptureDate of type varchar or char once import is done u can update the data and get it in date time format [QUOTE]alter table table1 add column CaptureDate_1 date; update table1 set CaptureDate_1=date_format(CaptureDate,'%Y-%m-%d') alter table table1 drop column CaptureDate;[/QUOTE] | |
Re: Save the image in the database as type BLOB and Load the image file and read the file into a variable using file_get_contents() or similar but best way is not to save image directly in Database rather save location or assign UUID to a image and save it to disk … | |
Re: Try this [code] SELECT budget.budget_name, total.fundlink.fundlink_amt FROM budget Left Join ( SELECT fundinfo.fk_budget_ID, fundinfo.fk_tiertwo_ID, Sum(fundlink.fundlink_amt) FROM (fundinfo LEFT JOIN fundlink on((fundinfo.pk_fund_ID = fundlink.fk_fund_ID`))) WHERE ((fundlink.date_create <= '2009-03-15') and (fundlink.date_create >= '2009-01-01') and (fundinfo.fundinfo_budg_yr = '2009')) GROUP by fundinfo.fk_tiertwo_ID )total ON budget.pk_budget_ID = total.fk_budget_ID [/code] | |
Re: Check what is causing the locking... Post your Show Global Status | |
Re: Try this way put this line in my.cnf file and bin logging will be enabled [code]log-bin=/home/Bin_Log[/code] [QUOTE]i start mysql as mysql -u root -p.[/QUOTE] This command is not to start Mysql but to connect to Mysql if you Mysql installed as service try service mysql start or go init.d [QUOTE]where … | |
Re: [QUOTE]Currently connected to remote server but remote configuration is not yet possible this is msg shown when trying to connect remotely to a database what does it means [/QUOTE] How are u trying to connect ? | |
Re: Take a note all binary collation are case sensitive | |
Re: Try this for Database Size or Table Size : [code=sql]SELECT TABLE_NAME,ROUND((DATA_LENGTH/1024)/1024) AS DATA_SIZE,ROUND((INDEX_LENGTH/1024)/1024) AS INDEX_SIZE,ROUND(((DATA_LENGTH/1024)/1024) + ((INDEX_LENGTH/1024)/1024)) AS TOTAL_TABLE_SIZE FROM information_schema.TABLES GROUP BY TABLE_NAME[/code] | |
Re: What does the error message say? It depends on your error message if its says access denied then it the problem with mysql /username/password but if its saying can't reach mysql server its the connectivity problem | |
Re: You can do it by a sp or from Mysql Administrator I generally do it from Sp [code=sql]DELIMITER $$ DROP PROCEDURE IF EXISTS `reports`.`SP_Mysql_Maintance_Plan_Optimize_Tables`$$ CREATE PROCEDURE `SP_Mysql_Maintance_Plan_Optimize_Tables`() BEGIN declare l_loop_end INT default 0; DECLARE IN_TABLE_SCHEMA VARCHAR(100); DECLARE IN_TABLE_NAME VARCHAR(100); DECLARE CUR1 CURSOR FOR SELECT TABLE_SCHEMA,TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA not … | |
Re: Create ID column in second table and run a update query on second table with joining both the tables,so all values in ID column will be update in second table properly come back and drop column in the first table | |
Re: Use Left outer Join [code=sql]SELECT bookings.*,times.slotId FROM bookings left outer join time on bookings.slotId=time.slotId WHERE bookings.date='$date' AND bookings.stylist='$stylist' ORDER BY time.startTime" having time.slotId is null[/code] | |
Re: Try this [CODE]SELECT consultants.name , consultants.surname , consultants.cell_number , consultants.id_number ,points.id_number FROM consultants LEFT OUTER JOIN points on points.id_number = consultants.id_number and date_added between '2008-01-01' and '2008-01-30' having points.id_number is null[/CODE] | |
Re: simple way is to comment the first query Use -- and a space to comment | |
Re: [CODE] 1. mysql> EXPLAIN SELECT avg(participation_score)*2 FROM yk_participation_score,yk_contributor WHERE yk_participation_score.user_id = yk_contributor.user_id mysql> EXPLAIN select avg(participation_score)*2 from yk_participation_score,yk_contributor where yk_participation_score.user_id = yk_contributor.user_id -> ; +----+-------------+------------------------+------+---------------+---------------+---------+-----------------------------------------+---------+--------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+------------------------+------+---------------+---------------+---------+-----------------------------------------+---------+--------------------------+ | 1 | … | |
Re: Rather than Joining all 3 into 1 and complicating things u can add some index to tables and optimize select queries to executing will be faster [CODE]INSERT INTO `yk_contributor_aging` ( contributor_id, descale) SELECT yk_contribution.contributor_id, SUM(log(7, 365)-log(7, DATEDIFF(now(), yk_contribution.contribution_date ))) AS descale FROM yk_contribution,yk_rating, yk_entity_score WHERE yk_entity_score.entity_key = yk_contribution.KEY AND DATEDIFF(now(), … | |
Re: If there are small number of rows in a table u can go with Like '%a%' else you need to try full text index | |
Re: See if you force mysql to use index [CODE]EXPLAIN SELECT tb1.Name FROM tb1, tb2 force index(t1.name) WHERE tb1.Name = tb2.Name;[/CODE] and also check it name column is of same data type in both the tables | |
Re: Try This.... [QUOTE]select t1.ID,t1.Ticket_ID,t1.inserted as 'Date',t1.Category,t1.Status from ticket t1 inner join (select t2.Ticket_id,Max(ID) as ID from ticket t2 group by t2.Ticket_ID )total on t1.ID=total.ID[/QUOTE] ![]() | |
Re: If u can have down time for the current database then try detach and attach it will be easy and fast | |
Re: Try Msql Migration Toolkit,its a free download on mysql site its the easier way | |
Re: I didn't understand the post completely but from what i got : Access denied for user 'ODBC'@'localhost' (using password: NO). As the Error Say You are trying to access Mysql with out username or Password,for this anonymous should be set in mysql if possible try connecting with a valid username … | |
Say we have a table with 1000 rows and there is no column which can identify a row(i mean no Identity or unique column) now if we want to select a set of rows from this table how can we do that? Ex: i want to select from rows 201 … | |
Re: how about [ICODE]select product_id from orders where order_id=?[/ICODE] This will give you all product_ids for a order | |
Re: Plz post table structure if you have any matching fields in both the tables say Org_ID you can use a join to get the data if the format you specified | |
Re: I guess you cant do that DB should know how to join 2 tables or else it will join with all rows in both the tables | |
Re: Try this [ICODE]update table1 set address=left(address,(locate(',',address) -1))[/ICODE] | |
Re: Or you can simply drive to your mysql installation folder and to bin folder and try mysql -u root -p | |
Re: Or you can use password('$password') you can use this while inserting in database and then to compare the text entered by user | |
Re: #1045 - Access denied for user 'root'@'localhost' (using password: NO) Error Say Password is not provided "using password: NO" check your connection string | |
Re: Hey in the query you r using "where marks is less than max(sum(marks))" This will be true for all the records as individual marks will be less than sum of them [code] Select Student.stud_id, Student.stud_name, Max(subject.marks) from Student, subject, stud_sub where sum(marks)< ( Select Max(sum(marks)) from student, subject, stud_sub where … | |
Re: Why cant you run a single query [code] SELECT name FROM table WHERE name=name_in; [/code] Some thing like this.... $sql = "SELECT name FROM table WHERE nam='$name_out'"; $result = mysql_query($sql, $db); $row = mysql_fetch_row($result); $name_from_db=$row[0]; if($name_out = $$name_from_db) { echo "It's John"; exit; } I am not expert in Php … | |
Re: I Guess Mirroring is a Sql Server 2005 concept, In Mysql only way you can maintain a Hot Backup is by replication(As per my knowledge) | |
Re: If you can type all the column names you can get the default avatar_id(1) Try this : [code=sql]SELECT members.*,ifnull(avatar_id,1) FROM members left outer join avatars on members.user_id=avatars.user_id where members.user_id ='{$user_id}'");[/code] | |
Re: your question is not clear How are emails stored in table? do you have separate columns to save each email ids or they are saved in 1 columns if email ids are saved in separate columns then try [code]select * from table1 where (email_column1 is not null and (email_column2 is … | |
Re: you can use limit [code] select * from table limit 1 [/code] | |
The End.