703 Topics

Member Avatar for
Member Avatar for Amaina

I have been cracking my head on this mater in the past couple of days. I am faced with a situaton where i need to write a MySQL equivalent of PHP code to loop through sql select results. The Php code looks like this $query = "SELECT pubid, author FROM …

Member Avatar for flashx4u
0
18K
Member Avatar for anitg

I have two tables like below tb1 Date Cr Dr 2018-04-29 100 50 2018-04-30 0 150 2018-05-01 250 100 2018-05-02 150 100 2018-06-10 300 250 2018-06-11 0 50 tb2 Date Cr 2018-05-01 350 2018-05-02 250 2018-06-10 300 2018-06-11 100 2018-06-15 200 2018-06-18 100 I need the following Result Apr May …

Member Avatar for flashx4u
0
536
Member Avatar for Ciarán_1

Hello, my code at the minute fetches a record and splits it up into a tuple, this is so each individual element can be displayed in an entry. I am now trying to create a feature which reads what is in the entrybox and updates the record in the database. …

0
262
Member Avatar for random_1

Hi. I'm retrieving a record and populating the data into input fields. there is a column called fld_order_date type timestamp. How do i retrieve the date? i have the usual retrieval: $stmt = $conn->prepare("SELECT * FROM tbl_orders_a154287 WHERE fld_order_id = :oid"); $stmt->bindParam(':oid', $oid, PDO::PARAM_STR); $oid = $_GET['edit']; $stmt->execute(); $editrow = …

Member Avatar for benanamen
0
260
Member Avatar for naheedkassam

Dear all, I have a scenario, where I have a single table with all my users listed in them. Each user also has a field indicating the user they report to. UserID UserDisplayName UserReportsTo ----------- ------------------------------------------------------------ ------------- 8 Anthony Karimi 3 9 naheed kassam 8 1 Administrator 1 3 Ramakrishna …

Member Avatar for naheedkassam
0
426
Member Avatar for Mati_1

I am looking for a mysql query to search and list most common pairs with their IDs and number of occurence. Thanks.

Member Avatar for Mati_1
0
891
Member Avatar for Ritesh_5

Hi, i have installed prestashop 1.4.8.2 & i need a report of last order date for each customers, please help me to create mysql query. i need below columns information from database. id_customer, firstname, lastname, email, last order date. or is there any way i can export in active customers …

Member Avatar for Ritesh_5
0
446
Member Avatar for mr_4

I have been butting my head against this problem for the past 4 hours, and I have to tap out. I know I can't be too far from correct I am just not sure what the missing ingredients are. Here is the problem question: Student status: List of all students …

Member Avatar for mr_4
0
383
Member Avatar for Himanshu Chawla

SELECT CASE WHEN (Employees.End_Date is null) THEN select EmpId, Emp_Name, Salary , Start_date , End_date ,DATEDIFF(DATE_ADD(Start_Date, INTERVAL 30 DAY), Start_Date) * Salary/30 as 'Total_Salary' from Employees ELSE Select EmpId, Emp_Name, Salary , Start_date , End_date ,DATEDIFF(End_Date, Start_Date) * Salary/30 as 'Total_Salary' from Employees END From Employees; Please help me to …

Member Avatar for AndrisP
0
349
Member Avatar for Xin_1

I am a beginner practicing how to create tables on SQL Here is what I've done: Create Table PO (Order_id int primary key, order_date date, customer varchar(1000)); Create table PO_Line_Item (Order_id int not null, Line_number int not null, Product varchar (30), Unit_Price decimal (10,2), Qty decimal (10,2), Tax decimal(10,2)); When …

Member Avatar for pty
0
2K
Member Avatar for arctushar

I want to get sum of estimate quantity from estimates table gropBy material_id. Also want get sum of mprs quantity related to previous query table. My estimates table is as below | id | project_id | material_id | estimatequantity | | 1 | 1 | 1 | 500 | | …

Member Avatar for diafol
0
276
Member Avatar for xuexue

i want to combine multiple rows into a single row using **DB2**. I have found this code, but I do not know how can i edit it>? CREATE FUNCTION MySchema/MyUDF ( PARCol2 CHAR(5) ) RETURNS VARCHAR(1024) LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA CALLED ON NULL INPUT DISALLOW PARALLEL BEGIN …

Member Avatar for Nate_3
1
2K
Member Avatar for ppohlmann

Hello SQL Gurus, This Query below is doing the job but it is horrible slow. Is there any way to make the query faster ? Perhaps a join .. inner outer, left ? I am looooost. Thanks for any help. SQLQuery1.SQL.Clear; SQLQuery1.SQL.Text:= 'SELECT * FROM orders_batch WHERE invoice_no=:elorder_no'; SQLQuery1.params.parambyname('elorder_no').Asstring := …

Member Avatar for ppohlmann
0
371
Member Avatar for Alv45525

Hello experts, I have to write a sql joining 6 tables. to retrieve classid, planname, workoutname,date,timeslot,status,staffemail and display them to a gridview. the tables are as below **tblclass** having columns *classid(PK)*, planallocationid*(FK to tblallocation)*, date, timeslotid*(FK to tbltimeslot),*status, staffid*(FK to tblstaff)* **tblallocation** having columns *planallocation(PK)*, planid*(FK to tblplan)*, workoutid*(FK to …

Member Avatar for xrjf
0
431
Member Avatar for Joe_10

I am trying to cast/ convert varchar to a numeric value. I have done this succesfuly when I eval the lower range, however I get an error when I do the upper range. this is my evaluation section that works. isnull(cast(measurmentdata.measvalue as numeric),0) < productinfo.lowerrange however when I try to …

Member Avatar for Sai_421
0
395
Member Avatar for Daron_1

Hello Everyone, I am working in MySQL Workbench 6.3 CE and trying to use a trigger inside of a stored procedure to see if it will detect if my email format is not in the right format I specified in the message text error, but I am having trouble because …

Member Avatar for Daron_1
0
333
Member Avatar for Venus_3

i have this code..,. i dont see what's wrong why its only working on the first record of LOOP of X set serveroutput on size 30000; DECLARE VTEMP NUMBER; VPARENT NUMBER; BEGIN FOR X IN ( SELECT TEMPLATE_ID, TYPE_ID, TYPE_KIND, RECORD_ID FROM RT_RECORDS WHERE TEMPLATE_ID = 106 )LOOP DBMS_OUTPUT.PUT_LINE('TYPE_ID X …

Member Avatar for AndrisP
0
279
Member Avatar for Marlon189

Hi, i have a db system where i fetch results from two tables. A user and transaction table. In the transaction table i have two columns which are sender and reciver id which refence in the user table. how do i get a sender name and receiver name in a …

Member Avatar for Reverend Jim
0
237
Member Avatar for newbee_jv

Hello all, I have the following code. Connection connection = getMySQLConnection(); try { Statement st = connection.createStatement(); String SQL = "SELECT ID, NAME FROM STUDENT WHERE ID=5"; ResultSet rs = st.executeQuery(SQL); System.out.println("SQL =" + SQL); while (rs.next()) { // do something... } } catch (SQLException se) { se.pringStackTrace(); } From …

Member Avatar for newbee_jv
0
396
Member Avatar for Mayank_6

when i upload image in form using cakephp at that time the image is insert but other data will not inserted...??

Member Avatar for Mayank_6
0
254
Member Avatar for nathan_8

/DROP TABLE STATEMENTS/ DROP TABLE BRANCH CASCADE CONSTRAINT PURGE; DROP TABLE SCREEN CASCADE CONSTRAINT PURGE; DROP TABLE SESSIONS CASCADE CONSTRAINT PURGE; DROP TABLE MOVIE CASCADE CONSTRAINT PURGE; /CREATE TABLE STATEMENT/ CREATE TABLE BRANCH( BRANCHID CHAR(2)NOT NULL, BRANCHNAME VARCHAR2(20), BRANCHSUBURB VARCHAR2(15), BRANCHPOSTCODE CHAR(4), CONSTRAINT BRANCH_PK PRIMARY KEY(BRANCHID)); CREATE TABLE SCREEN( SCREENID …

Member Avatar for Alec_2
0
490
Member Avatar for Mayank_6

i try to redirect one controller page to another controller page using cakePHP but it not working so please help me to solve this query....

Member Avatar for cereal
0
323
Member Avatar for newbee_jv

Hello all, I have an spring MVC app, that connects to my backend MySQL DB. I have my data source configured properly in my spring bean config XML file, as follow: <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property name="url" value="jdbc:mysql://localhost:3406/mydb" /> <property name="username" value="root" /> <property name="password" value="passwd" /> …

Member Avatar for newbee_jv
0
2K
Member Avatar for rchawdhari

Hi everyone, I have database in cassandra . I am facing difficulties in cassandra. So I want to migrate cassandra tables in mysql. Is it possible ? How I can do this? Please help me.

Member Avatar for Taywin
0
183
Member Avatar for James_63

I got two dropdowns in each product in my cart. When i select my both option my class on success is not updating the cost. It only updates when i refresh the page, i dont want to refresh my page to get the cost. this is my script... $(document).ready(function() { …

0
212
Member Avatar for nissy

From were we can generate backlinks? how its possible to generate a backlink for a day? Many are saying that it is through off page submissions?.. But do anyone know that how much submission should be done for a keyword?.. Please help me out

Member Avatar for happygeek
0
445
Member Avatar for AntonyRayan

Hi, I have a column "statustime" in a table , which has values( like,10:24:10 PM,12:04:00 AM) with mixed of AM and PM . I want to display the other values by "statustime" in ASC . How to do?

Member Avatar for cereal
0
575
Member Avatar for Zagor_1

I edit [this][1] todo app and make a multiple topics version of it. Like todos for X, todos for Y, todos for Z... However i couldn't find a proper way to edit this part : app.param('task_id',function(req,res,next,taskId){ req.db.tasks.findById(taskId,function(error,task){ if(error) return next(error); if(!task) return next(new Error('Task is not found')); //if there's data, …

Member Avatar for rproffitt
0
221
Member Avatar for jpbcorp

Ok, so this site sell me on developing a website saying "Death to the DIY" MoPro is another cookie cutter platform that says they will build it but..... well you tell me. eeshop.us I need help to understand how to put content, products and vblogs on the site. And if …

Member Avatar for happygeek
0
161
Member Avatar for saravind84

Hi, I want to delete about 60 crore records from few oracle audit tables to free up some space. I am planning to delete them in batches of size 10,000. I dont want to use up lot of space while performing these deletes. Can someone suggest me a way to …

0
231

The End.