Sql how to use group by

sql how to use group by SELECT column1, function_name(column2) FROM table_name WHERE condition GROUP BY column1, column2 ORDER BY column1, column2; function_name: Name of the function used for example, SUM() , AVG(). table_name: Name of the table. condition: Condition used.

Sql how to use group by Read More

Lua operators

lua operators == — Equal to whatever <= — Less than or equal to >= — Greater than or equal to < — Less than > — Greater Than ~= — Doesnt equal # — Length of something lua operators == equal to ~= not equal to < less than > greater than <= less […]

Lua operators Read More

Truncate delete and drop in sql

truncate delete and drop in sql DELETE – -DML COMMAND -Delete Rows from the table one by one -We can use where clause with Delete to delete single row -Delete is slower than truncate -ROLLBACK is possible with DELETE DROP- -DDL COMMAND -Delete the entire structure or schema -We can’t use where clause with drop […]

Truncate delete and drop in sql Read More

Test mysql connection

test mysql connection Example (MySQLi Object-Oriented) <?php $servername = “localhost”; $username = “username”; $password = “password”; // Create connection $conn = new mysqli($servername, $username, $password); // Check connection if ($conn->connect_error) { die(“Connection failed: ” . $conn->connect_error); } echo “Connected successfully”; ?> Example (MySQLi Procedural) <?php $servername = “localhost”; $username = “username”; $password = “password”; // […]

Test mysql connection Read More