11,093 Topics
![]() | |
I am using MySql 5.1. I want to create a dump file through command prompt. I am using the MySQL Command Line Client. I have searched on web and got a command as. `mysql -u username -p password -h host database_name > dumpfile.sql` While executing it in my client command … | |
Hi all, I have the following query: SELECT A.Name, MAX(B.VisitDate) AS 'Last Visit Date', A.Active FROM B INNER JOIN A ON B.NameCodeB = A.NameCodeA GROUP BY B.NameCodeB HAVING MAX(B.VisitDate) < DATE_SUB(CURDATE(),INTERVAL 2 MONTH) AND A.Active = 1 This selects a list of all people in the database who last visited … | |
Hi Im trying to get mysql_query result with foreach set up and i am just planning what i am going to do but I am stuck with adding foreach into my code so far. Basically F field has several different options which are duplicated lots of times, so i need … | |
Can anyone explain me on details the difference of Deadlock and Lockwait errors found on MySQL 5.1. Is it just the same? When did the deadlock error occur and when did the lockwait timeout occur? | |
This is working code $sql = "REPLACE INTO 2_1_journal (Number,RecordDay, RecordMonth) VALUES "; $insertQuery = array(); $insertData = array(); foreach ($_POST['row_id'] as $i => $row_id) { $insertQuery[] = '(?, ?, ?)'; $insertData[] = $row_id; $insertData[] = $_POST['date_day'][$i]; $insertData[] = $_POST['date_month'][$i]; } if (!empty($insertQuery)) { $sql .= implode(', ', $insertQuery); $stmt … | |
SELECT code_type,code,encounter,pid,provider_id,date,CONCAT('code_tye',':','code') INTO @code_type,@code,@encounter,@pid,@povider_id,@date,@standard_code FROM billing FOR EACH ROW BEGIN SELECT procedure_type_id INTO @type_id FROM procedure_type WHERE standard_code='@standard_code' FOR EACH ROW BEGIN INSERT INTO procedure_order(procedure_type_id,date_ordered,provider_id,date_collected,order_priority,order_status ,patient_instructions,patient_id,encounter_id) VALUES('@type_id','@date','@provider_id','@date','high','pending','complaints','@pid','@encounter') END END #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for … | |
I have tested out my procedure on my home machine. It woks pretty well I know there is output from the sql. Now I want to try it out on the host. It gives no output. Here is my php code $bob="call seeker($profound)"; if (mysqli_multi_query($conn,$bob)) { echo "<hr>"; echo "<table><th>Section</th><th>Author</th><th>Title</th>"; … | |
Hello guys, Long story short, when I register a user on my website, it enters for every single column value 0. It should be due to the fact that's not picking up the data from my registration page? Although, it should be ok as I am only picking up the … | |
I am getting this error when inserting a query into the SQL tab of a database, it only adds 2 tables when it is supposed to add more, but the error is stopping it? Screenshot: http://gyazo.com/b62b31137708228beb791ed6c8ad01ea Query im inserting: http://pastebin.com/rMJeA0Xb Software: MySQL Software version: 5.1.68-cll - MySQL Community Server (GPL) … | |
Good day all: I'm trying to create a graph using data from mysql on the jpgraph platform. I've been experiencing difficulties with an error 15009 and cannot seem to address the error --lots of reading on the net concerning this error has yield nothing. I'm hoping that someone here is … | |
I'm trying to sum all numeric fields individually. I won't always know the field names, otherwise I could manually construct the query `SELECT SUM(Field1) as Field1, SUM(Field2) as Field2...etc FROM myTable` Is there a way to construct this on the fly in mysql? I'm thinking there's probably a way to … | |
Hello all, i am developing a friend request type feature ion my site using php. So can ypu please advice me on how the database design should be there? Thank you | |
<?php $dbHost = "localhost"; $dbUser = "root"; $dbPass = ""; $dbName = "test"; $conn = mysql_connect($dbHost, $dbUser, $dbPass); if(!$conn){ die(mysql_error()); } mysql_select_db($dbName, $conn) or die(mysql_error()); if(isset($_POST['submit'])){ $field = $_POST['field']; } if(isset($_POST['submit2'])){ $field2 = $_POST['field2']; } if(isset($_POST['submit3'])){ $field3 = $_POST['field3']; } ?> <?php if(!isset($_POST['submit']) || isset($_POST['submit']) != "true"){ ?> <form id="create" … | |
Should store procedure cached in Mysql? If yes, How long it is stay in cache? In my case, When I call one store procedure first time, It is giving me result in 1sec, after that it gives me result in 400ms. and when I am changing some parameters passed to … | |
I have a query: SELECT b.user_id, b.active FROM users b WHERE b.followers_count != (SELECT COUNT(*) FROM (SELECT u.user_id FROM user_follow uf,users u,user_follow_request ufr WHERE uf.following_id = b.user_id AND uf.following_id = ufr.friend_id AND ufr.status = 'approved' AND ufr.user_id = u.user_id AND u.user_id != b.user_id AND u.active != 0 GROUP BY u.user_id) … | |
I am unable to maintain a GET variable with this pagination script. Was hoping you all could help. I am using a GET function so the user can choose which categories are displayed. I'm using a pagination script I found online and I am now confronted with this issue, when … | |
hi im working on a project please have a look at the form i need to design the database but i think i will need to instered those info in mutiple tables.  hope some one can help me out with this one.the sss1 radio option corespond to the … | |
hello, my appreciating, if you give example code in my problem i have 1 file csv with dilimited only column A example column a name | address | phone | birthofdate deby | jersey | 123456 | 01-March-1990 my case is I want to convert to txt with delimited | … | |
Hi I am not understanding , why the subquery of given query is converting into dependent subquery. Although the subquery is not dependent(not using primary query table) on main query. I know that this query can be optimized using joins,but here i just want to know the reason of this … | |
can any body provide me with a simple example of how insert and retrieve pictures along with text from mysql, kinda like when you post something in craigslist u add information about what ever you are selling and pictures, i would appreciate it, thank you in advance. ![]() | |
![]() | Hi, I have a very specific issue that I'm unable to work out a solution to. It's related to WordPress, but that's for context and isn't otherwise relevant. I have a table named wp_options. It's used to store various option information using 2 fields - option_name and option_value. These are, … ![]() |
hall guys! i have a static website that is not able to display news,music video and audio, because i want them to be displayed on page from database even allowing comments from audience. can please help me how i can do it step by step from creating a database,table retreive … | |
I am updating a summary table from detail table using inner join as follows drop TEMPORARY table if exists summ ; drop TEMPORARY table if exists det ; create TEMPORARY table summ (id int , val int ) ; create TEMPORARY table det (id int , val int ) ; … | |
The connection and setting are fine as I can insert things into the same db with different tables. Long story short below is the value that I want to insert into the db but it give me no error and nothing insert. I have use the echo and checked every … | |
I have these databases h1 h2 h3 Where each database has the quantity of items that are available to be sold from shop1, shop2 and shop3. I want my data to be concurent. For example 2 users may want to buy the same item the same time and the manager … ![]() | |
i have multiple users who need to update a table into mysql with a csv file they will need to do this by pasting the csv file into a text area on the website the first row of that file contains the name of each feild and i need to … ![]() | |
mysql query problem Sample data of my mysql. id | id2 | sender | recipient | senderread | recipientread | Title 31 | 31 | A177 | B213, A256| yes | yes | Question123 32 | 31 | A256 | A177 | yes | no | Answer456 33 | 33 … ![]() | |
this is the problem code : import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.io.IOException; public class Prepared { public static void main(String[] args) { try { readerHelper r = readerHelper.GET_INSTANCE; System.out.print("enter username: "); String user = r.is().readLine(); System.out.print("enter password: "); String pass = r.is().readLine(); Connection con … | |
Hi all! I'm stuck somewhere with starting a process from vb.net. I want to start a mysqldump process from my vb.net. This code works perfect if I run it from windows command prompt: "C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqldump.exe" --user=root --password=mypassword --host=localhost --port=3306 --database sakila > "C:\backup\sakilabackup.sql""" Then I took it to … | |
Hi, I made a page to show the information of the applications I apply and the interviews I made for selected applications and I use the inner join and left join to display data from different tables. This week I add another table to enter in it the comments. I … | |
I have a table called vw_results which holds the result profile for a particular student: idNum |courseUnit | marks | Gpp | grade| id | semseterID | sessionName 06/021| 2 | 47 | 8 | B+ | 1 | 1 | 2010/11 06/021| 3 | 56 | 7 | C … | |
I have two tables: Subscriber_detail SubscriberID | Merchant_ID 23 | 24 User_Detail User_ID | User_RegisteredID 23 | 1001001 24 | 1001002 Need to fetch User_RegisteredID from User_Login table for SubscriberID and Merchant_ID from Subscriber_Detail | |
I have an application, i'm using C# wtih asp.net I need to generate reports with my database (mysql), so I downloaded Crystal Reports. I'm trying to make the connection between Crystal Reports and my database, for that I've Add the User Data Source (MySQL ODBC 5.1 Driver) in the ODBC … | |
hey hai eveybody help me in sql..i have three fields namely passengerGender1,passengerGender2,passengerGender3 in single table..now i want to take count for female and male separately from the three fields..it is posssible friends?can anyone help me???thanks in advance...!! | |
Can any one guide me as I what a query in SQL that change all 'a' in string to 'b' in first_name column in name table. Here is my columns name: first_name | list_name | |
this is the table ITEM QTY UNIT rod1 50 cm rod1 1 m rod1 50 cm rod2 25 cm rod2 75 cm rod2 1 m this is the result i want user can see ITEM QTY UNIT rod1 2 m rod2 2 m this is tricky for a newbie, please … | |
Hi all: I'm trying to pull from a table all values of a specific row (accountids) and would like to iterate through each query result while perform a specified task with each value. Example: The following q-- $get_acctids="select accountid from company_info"; $result = mysql_query($get_acctids) or die(mysql_error()); while($row = mysql_fetch_array($result)){ $id_num= … | |
Hi guyz, When I click the tray icon of WAMPServer and select the phpMyAdmin option, it issues an error **Could not execute menu item (internal error)..... The system cannot find the specified path.** Previously, I could access it without any problem. Any ideas? | |
Hi, help me to configure (hibernate + mysql + xml) in eclipse, I am getting errors while following the sites when i got them in google seach thanks for your time | |
Hello! I have PHP and mySQL set up on a server, and everything works fine. I am able to connect to the SQL database successfully, etc. However, I want to set it up so that a user enters their "ID" in an input box. Then, the php script will return … ![]() | |
Hey, I've come across an error in my school project. I'm creating a college registration web app. The jsp displays a list of available classes with checkboxes to check the ones you would like to register for. I've been running it in debug mode and it throws an exception at … | |
Hi, I need help here. I have a for with multiple text inputs. input1 is link, input2 is description. This is repeated a number of time. Each link and description is one record, but I cant igure out how to add them to mysql as such. If I fill in … | |
Hi all - use the curdate() or current date to look at newly added awards in the last 3 months The SQL table used to store the created date when an award was added is **tbl_net_centre.reg_date** and keeps throwing up an error on the <= If anyone can advise the … | |
I have data that is inserted into a table A. I want that before 'insert' to table A, I should capture Specific data from the array and insert it into table B. Can somebody show me how to do that ? | |
So our server is located in Cali and we are 2 hours ahead so When I save my time to database it does it according to the local time. I tried to figure out how to use GetDate() and GetUTCDate() but can not figure out how to use it. How … | |
Hi friends! I have some trouble restoring a mysql database that I backed up with mysqldump. I have been trying to do this from a command prompt (Windows) This is my code: mysql -u root -pPassword databasename < C:\Backup\databaseNameToBeRestored.sql With this, I get the message that "mysql" is not recognized … | |
I have an html form that has 10 text field for trhe user too enter dates into. When the user clicks the submit button each text field should be added as a new record to a mysql table. The way I have it now if only 2 are filled in, … | |
I am using MySQL to plot data about a quiz into graphs for analysis reasons. I have created a series of queries (with the help of the members of this forum!) I am now saving them as routines so I can call them for efficiency. For some reason with a … | |
I am running analyses on a quiz and am trying to manipulate querys in order to produce bar charts. I am trying to display a graph which shows the percentages of candidates passing a particular quiz. The query I am trying to run is as follows: SELECT QuizName, (100*(COUNT(PassFail))/(COUNT(XXXXXX))) AS … |
The End.