/** * * * *
- Author: Hussein Jama
- Email: [email protected]
- Date: 10/05/2023
- @author H Jama
- @copyright HJA
*/
/**
- Make_circuitboard_db.sql
- Author: Hussein Jama
- Email: [email protected]
- Date: 10/12/2019
- @author H Jama
- @copyright HJA
*/
CREATE TABLE board_status
(
board_id
int(4) NOT NULL AUTO_INCREMENT,
msisdn
varchar(20) NOT NULL,
name
varchar(20) NOT NULL,
date
varchar(20) NOT NULL,
switch1
enum ('Off','On') NOT NULL,
switch2
enum ('Off','On') NOT NULL,
switch3
enum ('Off','On') NOT NULL,
switch4
enum ('Off','On') NOT NULL,
fan
enum ('Forward','Reverse') NOT NULL,
temperature
FLOAT(10, 2) NOT NULL,
keypad
int(1) NOT NULL ,
PRIMARY KEY (board_id
)
)
Insert into board_Status value ("2","+4478178149", "Hussein" ,"1 JAN 2020" , "1" , "1" , "1" , "1" , "1" , "2" , "10" , "9");
//storing details into mysql database //Web-user login: REMOVED IN THIS EXAMPLE //Web-user pw: REMOVED IN THIS EXAMPLE //Developer login:REMOVED IN THIS EXAMPLE //Developer REMOVED IN THIS EXAMPLE 'pdo_settings' => [ 'rdbms' => 'mysql', 'host' => 'localhost', 'db_name' => 'p17178096db', 'port' => '4567', 'user_name' => 'p17178096', 'user_password' => 'Furls~11', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci',
CREATE PROCEDURE sproc_tblOrder_Insert
@UserID int,
@Deliverystatus BIT,
@OrderTotal DECIMAL,
@OrderDate date
AS
insert into TblOrder ( UserID, Deliverystatus, OrderTotal, OrderDate)
values (@UserID, @Deliverystatus, @OrderTotal, @OrderDate);
RETURN @@Identity
<% //Begin creating the index Int32 Index = 0; Int32 Count = MyCart.Products.Count; //begnin creating the table Response.Write("<table border ="1">");
Response.Write("<tr>");
Response.Write("<td>");
Response.Write("Product ID");
Response.Write("</td>");
Response.Write("<td>");
Response.Write("Product Name");
Response.Write("</td>");
Response.Write("<td>");
Response.Write("Quantity");
Response.Write("</td>");
Response.Write("<td>");
Response.Write("Price");
Response.Write("</td>");
Response.Write("<td>");
Response.Write("</td>");
Response.Write("</tr>");
MyCart.OrderTotal = 0;
while (Index < Count)
{
Response.Write("<tr>");
Response.Write("<td>");
Response.Write(MyCart.Products[Index].ProductID);
Response.Write("</td>");
Response.Write("<td>");
// Response.Write(MyCart.Products[Index].ProductName);
Response.Write("</td>");
Response.Write("<td>");
Response.Write(MyCart.Products[Index].QTY);
Response.Write("</td>");
Response.Write("<td>");
Response.Write(MyCart.Products[Index].Price);
MyCart.OrderTotal += MyCart.Products[Index].Price;
Response.Write("</td>");
Response.Write("<td>");
Response.Write("<a href=\"Remove.aspx?Index=" + Index + "\">Remove</a>");
Response.Write("</td>");
Response.Write("</tr>");
Index++;
}
Response.Write("<tr>");
Response.Write("<td colspan='5'>" + MyCart.OrderTotal + "</td>");
Response.Write("</tr>");
Response.Write("</table>");
%>
sql-examples for receiving code from a data base that contains a list of products that a logged in user can select
<script>
var slideIndex = 1;
showSlides(slideIndex);
// Next/previous controls
function plusSlides(n) {
showSlides(slideIndex += n);
}
// Thumbnail image controls
function currentSlide(n) {
showSlides(slideIndex = n);
}
function showSlides(n) {
var i;
var slides = document.getElementsByClassName("mySlides");
var dots = document.getElementsByClassName("dot");
if (n > slides.length) {slideIndex = 1}
if (n < 1) {slideIndex = slides.length}
for (i = 0; i < slides.length; i++) {
slides[i].style.display = "none";
}
for (i = 0; i < dots.length; i++) {
dots[i].className = dots[i].className.replace(" active", "");
}
slides[slideIndex-1].style.display = "block";
dots[slideIndex-1].className += " active";
}
</script>
CREATE PROCEDURE [dbo].[Sporc_Joiningappointmentsdatesreport] @StartDate date, @EndDate date AS SELECT P17178096_tblSpeciality.HJ_SpecialityNo, P17178096_tblSpeciality.HJ_ShortCode, P17178096_tblSpeciality.HJ_LongDescription, P17178096_tblConsultant.HJ_ConsultantNo, P17178096_tblConsultant.HJ_FirstName, P17178096_tblConsultant.HJ_LastName, P17178096_tblAppointment.HJ_AppointmentDate, P17178096_tblHospital.HJ_HospitalName, P17178096_tblAppointment.HJ_Cost
FROM P17178096_tblAppointment,
P17178096_tblSpeciality,
P17178096_tblHospital,
P17178096_tblConsultant