I am working on an app where a user registers and its passed to the server where there information is added to the database. It passes various checks along the way but ails to add the user. Code below: <?php $con = mysqli_connect('localhost', 'root', 'root', 'eat4lessaccess'); //check connection if(mysqli_connect_errno()) { echo "1: Connection Failed"; //Error code 1 = connection failed exit(); } $username = $_POST["username"]; $password = $_POST["password"]; $name = $_POST["name"]; $email = $_POST["email"]; $phone = $_POST["phone"]; //Check username exists $usernamecheckquery = "SELECT username FROM useraccounts WHERE username='" . $username . "';"; $usernamecheck = mysqli_query($con, $usernamecheckquery) or die("2: Username Check …

Member Avatar
Member Avatar
+0 forum 2

Hello. I have a quick question. I am making a database as a personal project (I am using Microsoft SQL Server therefore I am using its SQL syntax). All it does is that it keeps track of singing groups and bands, the members in these groups, albums they made, songs they did and awards they won (for example, I can insert The Beatles into the Database and record all their members, when they debuted, when they disbanded, their songs and more). For now I am only going to create a table that can store the group's/band's name and another table …

Member Avatar
Member Avatar
+0 forum 5

All Time Show Null value Please help me what is the wrong in my code declare @mxdbvlu int declare @dbvlunm int set @mxdbvlu= (select max(Database_name) from TBL_FY_SELECT_1) if @mxdbvlu = null set @dbvlunm=1000 else set @dbvlunm=sum(@mxdbvlu+1) select @dbvlunm,@mxdbvlu

Member Avatar
Member Avatar
+0 forum 3

Hi all, I wanted to procedure to return number of days and weekdays between two dates. This is what I came up with and it seems to work ok, but I'd like to read what others think. And if there's already a single line function for this, oops. Also, I'm not too comfortable with when to use @variable or just variable. Thanks. DELIMITER $$ CREATE PROCEDURE `DATEDIFF_WEEKDAYS`(IN `IN_from_date` DATE, IN `IN_to_date` DATE) BEGIN DECLARE TOTAL_WEEKDAYS INT DEFAULT 0; DECLARE TOTAL_DAYS INT DEFAULT 0; DECLARE FROM_DTE DATE DEFAULT NOW(); DECLARE TO_DTE DATE DEFAULT NOW(); DECLARE CURR_DTE DATE DEFAULT NOW(); IF(IN_from_date = …

Member Avatar
Member Avatar
+0 forum 2

Really hoping someone can help me out or point me in the right direction. This is my first ever post in a coding forum so I apologize in advance if I’m breaking any forum rules. I already have a bunch of php code sorted from modifying web resources. I need help altering it further to help me accomplish my goals. Below I’ve included my code, along with screenshots of the code executed in a browser and my MySQL database table. Background: I’m a professional musician but I have extremely basic computer programming knowledge. Nothing formal.. I use google, YouTube, Forums, …

Member Avatar
+0 forum 0

here is the normal rows coming ![WhatsApp_Image_2019-11-04_at_2_32_36_PM.jpeg](/attachments/large/4/f5be1a527695a5bf62797e287c220820.jpeg) i want to show the group by product name with the count of store as the below picture ![WhatsApp_Image_2019-11-04_at_3_28_58_PM.jpeg](/attachments/large/4/b96ff7cb890fb01e6de9e5540a7e7a9e.jpeg) here are mysql query SELECT i.barcode, i.name, u.company_name, COUNT(i.id) AS IQTY, COUNT(U.id) AS UQTY FROM inventory i, USER u

Member Avatar
Member Avatar
+0 forum 1

can someone please help me with coding. I need to create a dropdown menu with the options being the category the user has inputted into a file upload page.

Member Avatar
Member Avatar
+0 forum 2

How do I echo selected option? <?php session_start(); if(isset($_SESSION['cherianne'])){ }else{ header("Location:login.php"); } include("../includes/header.php"); // Retrieve our critical page setter variable. $char_id = $_GET['id']; //echo "<h1>$char_id</h1>"; // set this as a default value if (!isset($char_id)) { $result = mysqli_query($con, "SELECT bid FROM cde_blog LIMIT 1"); while ($row = mysqli_fetch_array($result)) { $char_id = $row['id']; } } // Step 3: UPDATE the DB with the new info from the form. Validate first. if(isset($_POST['mysubmit'])) { $title = strip_tags(trim($_POST['title'])); $message = strip_tags(trim($_POST['message'])); //echo "$title, $message"; $valid = 1; $msgPre = "<div class=\"alert alert-success\">"; $msgPreError = "<div class=\"alert alert-danger\">"; $msgPost = "</div>\n"; // Title Validation if((strlen($title) …

Member Avatar
+0 forum 0

CREATE TABLE Peaje ( id_no_pk CHAR(2) NOT NULL, nombre VARCHAR(30) NOT NULL, localizacion VARCHAR(30) NOT NULL, dirrecion VARCHAR(50) NOT NULL, tipo CHAR(1) NOT NULL, municipio_fk CHAR(2), CONSTRAINT Peaje_id_no_pk PRIMARY KEY(id_no_pk) CONSTRAINT Peaje_municipio_fk FOREIGN KEY (municipio_fk) REFERENCES Municipio(id_no_pk)); CONSTRAINT Peaje_municipio_fk FOREIGN KEY (municipio_fk) REFERENCES Municipio(id_no_pk)) * ERROR at line 9: ORA-00907: missing right parenthesis The parenthesis are in pairs and match. Why would this error message occur and how could I fix it>? Edit: this is the other Table for reference: CREATE TABLE Municipio ( id_no_pk CHAR(2) PRIMARY KEY, nombre VARCHAR(20) NOT NULL ) ;

Member Avatar
Member Avatar
+0 forum 1

after i key-in the form, the function change the whole column with the same value for example if i put first name JOHN it will update whole column with JOHN <?php session_start(); require_once("connection.php"); if (isset($_POST['edit'])) { session_start(); $s=mysqli_query($con,"UPDATE user SET first_name ='" . $_POST['first_name'] . "'"); $row = mysqli_fetch_assoc($s); if ($s) { $_SESSION['user_name']=$_POST['user_name']; $_SESSION['first_name']=$_POST['first_name']; echo "<script type='text/javascript'>alert('Successful - Record Updated!'); window.location.href = 'profile.php';</script>"; } else { echo "<script type='text/javascript'>alert('Unsuccessful - ERROR!'); window.location.href = 'profile.php';</script>"; } } ?>

Member Avatar
Member Avatar
+0 forum 3

So I am really interested in making a database, I have knowledge about html and css, not javascript and I just want to begin learning and making a database. I am going to use this website: https://www.000webhost.com/?utm_source=000webhostapp&utm_campaign=000_logo&utm_medium=website&utm_content=footer_img so you can see my website in the internet, I don't really expect a lot of people are going to my website, like more than 20 people in a day, but here is the question or discussion? how and where do I begin learn about databases, I don't really care what language I am going to use, like sql or php, is sql …

Member Avatar
Member Avatar
+0 forum 7

I am currently creating a product lookup system for a project of mine, however from reading around it has come to my attention that an OLEDB connection will not handle the SQL query below as it will not handle more than a simple "SELECT, FROM". Table: tbl_ProductInformation Field: Product_Name CurrentEntry = Variable storing the users entry [CODE] "SELECT Product_Name FROM tbl_ProductInformation WHERE Product_Name LIKE '*" & CurrentEntry & "*'" [/CODE] The outcome of this query is then put into a listbox. Is there anyway to make the OLEDB SQL query work so that the returned entries will correctly narrow down …

Member Avatar
Member Avatar
+0 forum 16

Please I need your help, I am new to PHP and I need your help in inserting multiple select array into the database in the form of this. This is what I want to achieve. My table has 3 columns (id, examno, results). I want results column to be inform of subjects grades, subjects grades.........depending on the numbers of subjects and grades users select (e.g English C6, Mathematics C6) all in one column results. ## This is my html codes ## <form action="insert.php"> <div class="form-group"> <label>Exam Number</label> <input type="text" class="form-control" name="examno" id="examno"> </div> <table width="100%" cellpadding="0" cellspacing="0" border="0" class="table table-borderless" …

Member Avatar
+0 forum 0

Please I need your help, I am new to PHP and I need your help in inserting multiple select array into the database in the form of this. This is what I want to achieve. My table has 3 columns (id, examno, results). I want results column to be inform of subjects grades, subjects grades.........depending on the numbers of subjects and grades users select (e.g English C6, Mathematics C6) all in one column results. ## This is my html codes ## <form action="insert.php"> <div class="form-group"> <label>Exam Number</label> <input type="text" class="form-control" name="examno" id="examno"> </div> <table width="100%" cellpadding="0" cellspacing="0" border="0" class="table table-borderless" …

Member Avatar
+0 forum 0

Hi everyone! i have a question that, if there are two radio buttons Male and Female, if some select male,this value will be store into database, but if he select again another value which is female,then how the first value(Male) will be replace by second value (Female) in the database using **PHP and Ajax**, please give me an easy solution

Member Avatar
Member Avatar
+0 forum 2

If an index file is missing in a folder, apache uses its own file/files to list the contents of the folder. Since I don’t want to create an index file in every folder in the file systems, I wonder where I can find the file/files that apache uses when there is no index file.

Member Avatar
Member Avatar
+0 forum 1

I use MampPro to setup my sites on the local server... all well and good. So, every time I fire it up I get the upgrade nag... so, I figure its time, and hit the upgrade... and it does its thing. BOOM, every database I had there - gone! GRR! Dang! - Fortunately I was proactive and copied all of the previously ( the DB dir Mamp ). The internet tells me to simply put them back in the dir and restart - which I do.... Now PhpMyAdmin "sees" the DB's but does not have index's for any of them …

Member Avatar
Member Avatar
+0 forum 7

Hi all, How to store data in two different tables when we click the button. Suppose I have a 2 tables named as team1 and team2. In table team1 have 2 fields teamid,teamname In table team2 have 3 fields team2id,team2name,teamid here teamid is foreign key. So when i click on insert button all the data will be inserted to respective tables i need jsp and oracle codes i dont know any idea of this how to do that task can you please help me any one its arjent for me please . Thanks

Member Avatar
+0 forum 0

Hello! I have a question and I don’t know whether the title is actually descriptive. For some background on the matter, we use Sage 50 as our merchandise information system and for our reporting and controlling tools we run Access queries. Since our database had been reset at some point I am missing some history data. I need to find the creation date for each article. But the only query covering the whole period since the beginning will return a table like that: `PK | ART | DATE` `3262 | 000 | 17.05.2013` `3262 | 000 | 23.01.2019` `3150 | …

Member Avatar
Member Avatar
+0 forum 5

Hi, I have a form which consists a dynamic dependent dropdown and I want to maintain the entered data into the fields after the form is saved or edited. For an example: <input type="text" name="serial" value="<?php echo $serial;?>"> Similary i need to get the value in my dropdown as well. Hope there is a solution for this. Below is my code. ## ajax.js ## $(document).ready(function() { $("#brand").change(function() { var Brand_ID = $(this).val(); if(Brand_ID != "") { $.ajax({ url:"SR.php", data:{b_id:Brand_ID}, type:'POST', success:function(response) { var resp = $.trim(response); $("#model").html(resp); } }); } else { $("#model").html("<option value=''>----Select Model----</option>"); } }); }); ## Dropdown …

Member Avatar
Member Avatar
+0 forum 2

I have storing major data in mysql and logs are stored in cassandra. Cassandra db getting heavier and difficult to do queries. So I want to migrate all my cassandra's table in mysql is it possible?

Member Avatar
Member Avatar
+0 forum 2

Hlo Plz anyone give a coading of classic asp i want to save my csv and excel file in databse

Member Avatar
+0 forum 0

In MySQL Database i have a worker who has 1 year of leave days (about 360 days): +--------+---------+---------+-------------+---------+-----------+ |ID_LEAVE|ID_WORKER| BEGIN_DATE | END_DATE | +--------+---------+---------+---------+------------+------------+ | 4 | 26 |2019-03-19 07:00:00 |2020-03-19 15:00:00 | +--------+---------+---------+----------------------+------------+ When i I'm going to run below Mysql Command which calculates leave time without weekends and holidays (which I'll show in code snippet), then it shows about like that: +--------+---------+---------+-------------+---------+----------+----------+ |ID_LEAVE|ID_WORKER| BEGIN_DATE | END_DATE |LEAVE TIME| +--------+---------+---------+---------+------------+-----------+----------+ | 4 | 26 |2019-03-19 07:00:00 |2020-03-19 15:00:00 |838:59:59 | +--------+---------+---------+----------------------+-----------+----------+ Which time 838:59:59 is about... 35 days. I have a trouble with it. Is that possible to calculate …

Member Avatar
Member Avatar
+0 forum 1

Hi group, I'm attempting to populate a listview with data from my test database created via Visual Studio 2019. I'm getting a syntax error that says, "Incorrect syntax near the keyword 'FROM'." It's not clear to me what the error is. The code I've written is as follows: Dim strQ As String = String.Empty Dim datasource As String = "Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\Don\Documents\Visual Studio 2019\SalesForm\DWHRPT.mdf;Integrated Security=True" conn = New SqlConnection(datasource) Dim searchID As String = tbxCompanyName.Text strQ = "SEARCH CUST_ACCT_NO, CUST_COMPANY_NAME, CUST_FIRST_NAME, CUST_MIDDLE_INITIAL, CUST_LAST_NAME FROM CUSTREC WHERE CUST_COMPANY_NAME LIKE '" & searchID & "%'" cmd = New SqlCommand(strQ, conn) da = New …

Member Avatar
Member Avatar
+1 forum 5

Please, why I got this error(SQL Error: ORA-00907: missing right parenthesis ) whats wrong in my code? CREATE TABLE DomeniuAB(ID_DOMAB NUMBER(10) constraint ID_DOMAB_PK PRIMARY KEY , DENUMIRE VARCHAR2(20) NOT NULL, DETALII VARCHAR2(20) NOT NULL, ISBNAB_CarteAB VARCHAR2(15), CONSTRAINT ISBNAB_FK FOREIGN KEY (ISBNAB_CarteAB) REFERENCES CarteAB(ISBNAB), CNPAB_AutorAB NUMBER(10), CONSTRAINT CNPAB_FK FOREING KEY (CNPAB_AutorAB) REFERENCES AutorAB(CNPAB));

Member Avatar
Member Avatar
+0 forum 3

Hi group, I'm trying to store the information from a various textboxes into my database. However it is not writing the data (I'm getting my planned error message, "New Record FAILED. Please contact your systems administrator." From the code below, do you see where my error may be? What corrections do I need to make to ensure a successful insert? Dim con As New SqlClient.SqlConnection con.ConnectionString = ("Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\Don\Documents\Visual Studio 2019\SalesForm\DWHRPT.mdf;Integrated Security=True") con.Open() Dim com As New SqlClient.SqlCommand("", con) com.CommandText = "INSERT INTO CUSTREC (CUST_ACCT_NO, CUST_COMPANY_NAME, CUST_LOCATION, CUST_TYPE, CUST_FIRST_NAME, CUST_MIDDLE_INITIAL, CUST_LAST_NAME, CUST_MAIL_ADDRESS1, CUST_MAIL_ADDRESS2, CUST_MAIL_CITY, CUST_MAIL_STATE, CUST_MAIL_ZIP_CODE, CUST_MAIL_ZIP_PLUS4, CUST_CREDIT_LIMIT, CUST_PRIMARY_PHONE, CUST_ALT_PHONE, …

Member Avatar
Member Avatar
+0 forum 4

Hi, I want to make online shop and I made most of it but I have problem on product page.I want for "customers" ( this is my personal project so ... ) to be able to choese and then what they choese to be store into table. I struggling with this more then 3 hour , I try everyhing , this is my last shoot. (I used the echo because I want to show it , so after that I would put insert into, but ... I was not able to do it ) <?php $con = mysqli_connect("localhost","root","","basic"); $query = …

Member Avatar
Member Avatar
+0 forum 1

hello every one please can any body do this task for me please becouse our instructor in the university uploaded it and I dont have enough time becouse im studying for my final exams please any one and i will be helpfull for him/her :) this is the task Create a car rental system where customers rent cars for a given period of time. Car – a class for all cars. Holds car information and an array of rents. Implement several types of cars as subclasses: Small car – 4 passengers, Motor 1200, air-conditioner Medium car – 4 passengers, Motor …

Member Avatar
Member Avatar
+0 forum 2

I'm writing stored procedure with dynamic sql having dynamic table name as, CREATE OR replace PROCEDURE Pr_get_result (p_table_name IN VARCHAR2, p_object_Id IN VARCHAR2) IS p_prop_code VARCHAR2(50) := 'pH'; BEGIN EXECUTE IMMEDIATE 'DECLARE ' || ' TYPE ObjCurTyp IS REF CURSOR; ' || ' v_obj_cursor ObjCurTyp; ' || ' v_stmt_str VARCHAR2(32000); ' || ' v_obj_record ' || p_table_name || '%rowtype; '|| 'BEGIN ' || ' v_stmt_str := ''SELECT * FROM ( SELECT * FROM '|| p_table_name ||' where CREATED_DATE<= ( SELECT CREATED_DATE FROM '|| p_table_name ||' WHERE object_id='|| p_object_Id ||' AND PROPERTY_CODE='|| p_prop_code || ' ) Order By CREATED_DATE DESC ) …

Member Avatar
Member Avatar
+0 forum 1

Which SQL data types can be used in SAP HANA?

Member Avatar
Member Avatar
-1 forum 1

The End.