Skip to content

Instantly share code, notes, and snippets.

db opened for search button
User searched for "101"
Print out of query "SELECT * FROM RoomManagement WHERE (RoomNum) VALUES (:RoomNum)"
if it fails here its your sql query not the application connection to db no need to check if the db is open it is 1122 "No query Unable to fetch row"
end of create function 1125
Database closed mainwindow.cpp mainwindow::mainwindow
void roomManagementDialog::on_editRoomSearchBTN_clicked()
{
MainWindow conn;
QSqlQueryModel * model=new QSqlQueryModel();
QSqlQueryModel * model2=new QSqlQueryModel();
conn.openDB();
qDebug() << "db opened for search button";
QSqlQuery* qry=new QSqlQuery(conn.myDB);
QSqlQuery* qry2=new QSqlQuery(conn.myDB);
QString SearchQry;
#include "roommanagementdialog.h"
#include "ui_roommanagementdialog.h"
roomManagementDialog::roomManagementDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::roomManagementDialog)
{
ui->setupUi(this);
//For using public slots from mainwindow.h
MainWindow conn;
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QtWidgets>
#include <QDateTime>
#include <QTimer>
#define Path_to_DB "/home/ghostly/Desktop/projects/Business Development /HMS/APPLICATIONS/Database/HMSSecureD"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
//set up for the date and time labels
QTimer *timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(showTime()));
timer->start(1000);
showTime();
QDateTime dateTime = dateTime.currentDateTime();
QString dateTimeString = dateTime.toString("dddd dd/MM/yyyy");
QString errorDateTimeString = dateTime.toString("dd/MM/yy hh:mm:ss");
ui->showDateLabel->setText(dateTimeString);
@output['products'][0]
=> {
"url"=>"http://omgili.com/ri/.wHSUbtEfZTzBH6c9Z4cI15_sA3Hthoy48U8beRZ_m5lA7IjRC07KAl_t9PZZTUpVyIElYRPNwESkpgWrFuLtCsKQ1Apdjx_jld142pfHUAdippyPkgHob2bwpktxkzZqvVelr3L3OOq9qp5XCHXEYkx1GYb0O_awd5Z8FnemrBnhIJ4ZIOaKn7WinS9k36LajW78ScZZFngDQem4_p6BKrC02m1OhRc",
"uuid"=>"bc54af0e0b4da231cad1a1352544fd3e6c234c68",
"source"=>{
"site_full"=>"www.walmart.com",
"site"=>"walmart.com",
"site_section"=>"https://www.walmart.com/",
"section_title"=>"Walmart.com: Free 2-Day Shipping on Millions of Items",
"country"=>"US"},
@scope2229
scope2229 / application.js
Created November 17, 2017 16:08
Simple rails project
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
// vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file. JavaScript code in this file should be added after the last require_* statement.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin:0px;"=>
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-WLC-navbar-collapse-1" >
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<nav class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a href="/" class="pull-left"><img src="assets/windsorL.png" class="img-responsive" alt="windsor lodge como"></a>
</a>
</div>
<div class="collapse navbar-collapse" id="links">
<ul class="nav navbar-nav container-*-fluid pull-right">
<li class="active"><a href="/">Home</a></li>
<li><a href="rooms">Rooms</a></li>
@import "bootstrap-sprockets";
@import "bootstrap";
@import "jquery-ui";
.soci li{
display:inline-block;
margin:0 0.2em;
}
i.f-1 {