[Solved] How to Remove Duplicates Values from table [duplicate]

Since your screenshot is of phpMyAdmin, I’m going to assume that we’re talking about MySQL here (when asking questions, that’s helpful information as various SQL dialects have different tools that can be used). If you don’t need id in your results, you can just use DISTINCT: SELECT DISTINCT Username, Video FROM YourTableName This returns a … Read more

[Solved] Autoincrement problem [duplicate]

You received the answer the last time you posted this question. MySQL maintains an internal counter that is incremented every time a new row is inserted into a table with an auto-increment column. The increment value does not go down when a row is deleted. To make things work the way you want, you will … Read more

[Solved] I don’t know what is wrong? Some body help me [closed]

Syntactically correcter and probably garbage.. SELECT person.CustomerID as CustomerID, address.Street as Street, (SELECT a FROM Company comp WHERE comp.Id = person.ID AND entry_key = ‘_custComment’ ) comp, (SELECT a FROM company comp WHERE company.ID = person.ID AND entry_key = ‘_otherInfo’) other from Address addr, Person person WHERE person.cid = custbasicinfo.cid AND person.cid = addr.cid solved … Read more

[Solved] how can I run mysql script in php?

If you are using the GET method, us $_GET to get the submit form data. <?php $servername = “localhost”; $username = “root”; $password = “”; $dbname = “test”; session_start(); // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die(“Connection failed: ” . $conn->connect_error); } if(isset($_GET[“action”])&&($_GET[“action”]==”versave”)){ $gp_name = $_GET[‘gp_name’]; … Read more

[Solved] Calculate SUM in PHP

Incidentally, everything up to while ($row… can be rewritten as follows: SELECT p.product_name , p.birim , SUM(p.quantity) total FROM urun u JOIN product p ON p.product_name = u.urun AND p.quantity > 0 AND p.grup != ‘uygulama’ AND p.skt > CURDATE() GROUP BY p.product_name , p.birim; 0 solved Calculate SUM in PHP

[Solved] Import database from Excel [closed]

For MySQL. Excel sheet data prepared for importing must be saved as CSV text file. This file must be placed in some place accessible by MySQL. These steps must be performed by some program/script/tool external to MySQL. Then it must be imported using LOAD DATA INFILE statement into temporary table, imported data is processed and … Read more

[Solved] How to get top five calculations only to appear

Three problems. ORDER BY dogs.affix LIMIT 5 returns bottom 5 not top. It should be ORDER BY dogs.affix DESC LIMIT 5 to get the top. affix returns either null or an emprty string and that’s why you are getting the first error. Define this field as int not null default 0 in your database. $total … Read more

[Solved] Session Management in Jaggery.js [closed]

To connect Jaggery to MySQL, you need to download JDBC driver jar to <jaggery>\carbon\repository\components\dropins\ directory. In MySQL, create new database sodb by typing: mysql> create database sodb. the example below shows how to create table, insert data in MySQL and view the data using Jaggery. Create folder sodbmysql in /apps/ Create sodb.jag file in the … Read more

[Solved] Parse error: syntax error unexpected T_CONSTANT_ENCAPSED_STRING [closed]

This is mostly syntax errors. If you want to declare an array, you either use array() or the shorthand []: $Config[‘URL’] = array( ‘Default’ => array( ‘Require.www’ => false, // www.example.com ‘SSL.enabled’ => true, // https:// ‘Server’ => ‘***’, // public server ‘Lang’ => ‘en_US’ // GLOBAL. ) , ‘Other’ => ” //’example.com’ => [‘Require.www’ … Read more

[Solved] Getting syntax errror when adding second where clause [closed]

Your quotation mark is in the wrong place. $results = $wpdb->get_results(” SELECT wp_users.ID, wp_users.display_name, stories.SID, stories.story_name, stories.category, writing.text, writing.approved FROM stories INNER JOIN wp_users ON stories.ID = wp_users.ID INNER JOIN writing ON stories.SID = writing.SID WHERE (stories.SID = $the_SID) AND (writing.approved = ‘Y’)”); 4 solved Getting syntax errror when adding second where clause [closed]

[Solved] Proper formatting of an SQL function using Workbench [closed]

CREATE FUNCTION get_id(NAME IN Courses.NAME%TYPE ,COURSE_ID_O[] OUT ARRAY ) RETURN COURSE_ID_O BEGIN IF NAME LIKE ‘_J%’ OR NAME LIKE ‘_Z%’ THEN SELECT COURSE_ID INTO COURSE_ID_O FROM COURSES WHERE COURSE_NAME=NAME ; ELIF NAME=” OR NAME=NULL THEN DBMS_OUTPUT.PUT_LINE(‘Please enter a valid string.’); END IF EXCEPTION WHEN NO_DATA_FOUND THEN DBMS_OUTPUT.PUT_LINE(‘No record found If it is blank or null: … Read more

[Solved] sql get query to get any student records who have passed multiple certificates? [closed]

SELECT * FROM student_certificates GROUP BY student_id HAVING COUNT([DISTINCT] certificate_id) >= 20 Join students table if some columns from it needed (do not forget to expand GROUP BY expression accordingly). 1 solved sql get query to get any student records who have passed multiple certificates? [closed]