I use codeigniter3.0.0 version, when i run the project i get this error plz tell me how i fix this error. Error Number: 1048 Column 'no_of_people' cannot be null INSERT INTO reservation (no_of_people) VALUES (NULL) Filename: C:/xampp/htdocs/book/application/models/Books_model.php Line Number: 26 My model code is class Books_model extends CI_Model{ public function __construct(){ $this->load->database(); } public function get_restaurants() { $sql = "SELECT restaurant_id, names FROM restaurants "; $query = $this->db->query( $sql ); return $query->result(); } public function insert_into_db() { $people =$this->input->post('no_of_people'); return $this->db->insert('reservation', array('no_of_people'=>$people)); } } Controller <?php error_reporting(E_ALL); ini_set('display_errors', 1); class Booking_Controller extends CI_Controller{ public function __construct(){ parent::__construct(); $this->load->model('Books_model'); } public …

Member Avatar
Member Avatar
+0 forum 3

Dear All! I want to introduce a useful tool for PostgreSQL, called dbForge Studio for PostgreSQL. The main idea behind this tool is to create, develop, and execute queries, edit and adjust the code to your requirements in a convenient and user-friendly interface. Take a look at its project page: https://www.devart.com/dbforge/postgresql/studio/ If you have enough free time to download and use it, tell me what you think. Thanks for reading this, Jordan Sanders

Member Avatar
Member Avatar
+1 forum 1

Hello Guys, So im a student at 12 grade and im trying to build a website from scratch and i've been successfull until now, i've been stuck in this error for 2 or 3 days, i cant send the text area + other input to database at the same type and when i do it goes in separate ways example in 1st print. <textarea name="txtDesc" row = "50" cols = "50" id="txtDesc"></textarea> <?php if(isset($_POST['formSubmit'])) { $con = mysql_connect ('localhost','usename','password') or die(mysql_error()); mysql_select_db('database') or die(mysql_error()); $desc = ($_POST['txtDesc']); $sql = "INSERT INTO registo_anomalias (`desc`)"."VALUES('$desc')"; $result = mysql_query($sql) or die(mysql_error()); } ?> …

Member Avatar
Member Avatar
+0 forum 1

This problem's driving me crazy since yesterday. I have a table consist of 5 columns: kode_barang (item ID), nama_barang (name of item), qty (quantity), harga_beli (price), jumlah (total). User can input 2 items. This is the code of the form: <HTML> <?php include "koneksi.php"; ?> <form action="insert3.php" method="POST"> <table id="theTable" border="1"> <thead> <tr> <th> Kode Barang</th> <th> Nama Barang </th> <th> Qty </th> <th> Harga Beli </th> <th> Jumlah </th> <tr> </thead> <tbody> <tr> <td type="text" name="kode_barang" id="kode_barang1"/readonly> <?php mysql_connect("localhost","root",""); mysql_select_db("skripsi_1"); $result = mysql_query("select * from input_data_barang"); $met = "var kode_barang = new Array();\n"; echo '<select name="kode_barang" onchange="changeValue1(this.value)">'; echo '<option></option>'; …

Member Avatar
Member Avatar
+0 forum 1

Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problems ???? how to fix anyone help me ??

Member Avatar
Member Avatar
+0 forum 2

Hi good day guys.. i am doing a POS in Microsoft access for my thesis.. the problem .. i create a button and i want to enter a data to the list box.. if you click the menu button it will automatically add the item on list box.. and i also have the table of my product it include the product name, price and quantity..thanks for you're help

Member Avatar
Member Avatar
+0 forum 2

As it seems to come up often enough I figured I'd throw together a quick snippet outlining basic methods for data manipulation in SQL Server using C#. In all examples the coder will need to substitute their own connection string details and variables. I utilised parameters for 3 of the examples but they can just as easily be replaced by direct references to dynamic controls in your application if desired. The benefit of parameters, however, is that they set the 'type' of the variable being passed and add an additional level of type checking to the app. I'm hoping I …

Member Avatar
Member Avatar
+2 forum 13

Hi hope you can help me. I have studied a lot to make my website using php and mysql and I know how to insert data in a table from a form, how to select and display data on page etc. Lately I got involved with wordpress which is a great CMS. The only problem is so different and is driving me nuts, also because I find no help in the various tutorials online. I have some simple questions. 1)Can you tell me how to insert data into a tablepress table from a form (my site is about hotel booking)-2) …

Member Avatar
+0 forum 0

I inserted data in sql server using asp.net (MVC 5), and its flowing nicely, but my problem is this. I don't want to insert in sql the exist data. How can I do it?

Member Avatar
Member Avatar
+0 forum 11

this is the response i get (1045, "Access denied for user 'point3hu_leo'@'197.253.66.85' (using password: YES)") Press any key to continue . . . from pony.orm import * db = Database() db.bind('mysql',host= 'poin.com',user='pointeo', password = 'lxxxx',db = 'poi_data')

Member Avatar
Member Avatar
+0 forum 6

hi all , Am doing event management project. In jsp page am using javascript date picker. Then i passed that to servlet page by the following code. DateFormat formatter ; formatter = new SimpleDateFormat("dd-MM-yyyy"); Date date=formatter.parse(request.getParameter("date")); now I want to insert date in mysql database , How can I achieve that.Pls help me. Thanks in advance ..

Member Avatar
Member Avatar
+0 forum 14

Hello, how can I improve this form login with error alerts? For example, if the fields are empty, if entered data do not match any user, etc. etc. Right now my form is so, taking advantage of a class: if(isset($_POST['login'])){ //Retrieve the field values from our login form. $username = !empty($_POST['username']) ? trim($_POST['username']) : null; $password = !empty($_POST['password']) ? trim($_POST['password']) : null; if($user->login($username, $password)) { header('Location: index.php'); } else { $message[] = 'We found problems with the login, please try again.'; } }

Member Avatar
Member Avatar
+0 forum 2

write a c++ program that asks user to insert 2 numbers

Member Avatar
Member Avatar
+0 forum 1

form: <form> <table> <tr> <th>Subject</th> <th>Description</th> <th>Final Grade</th> <th>Remarks</th> </tr> <!-- You can loop this one, depends on the subjects. Subject must not be encoded. Baka lalagyan ng maling subject. I just base it to your design so naging ganito. --> <tr> <td><input type="text" name="grades[][subject]" id="grades[][subject]" value="" /></td> <td><input type="text" name="grades[][description]" id="grades[][description]" value="" /></td> <td><input type="text" name="grades[][grade]" id="grades[][grade]" value="" /></td> <td><input type="text" name="grades[][remark]" id="grades[][remark]" value="" /></td> </tr> <tr> <td><input type="text" name="grades[][subject]" id="grades[][subject]" value="" /></td> <td><input type="text" name="grades[][description]" id="grades[][description]" value="" /></td> <td><input type="text" name="grades[][grade]" id="grades[][grade]" value="" /></td> <td><input type="text" name="grades[][remark]" id="grades[][remark]" value="" /></td> </tr> <tr> <td><input type="text" name="grades[][subject]" id="grades[][subject]" value="" /></td> …

Member Avatar
Member Avatar
+0 forum 6

I have a database in mysql which contains of four tables (Student, Units, Offering and Enrols_in) and i want to create an enrolment page where students can enrol in units which will be offered in each semester. Student names will be entered in the database and they will use their given password and username to log into the system. When they are loged in, they will have to enrol themselves in the units which are offered and the units which they are enroled in will be displayed in their student profile. The part I'm confused is the enrol button and …

Member Avatar
Member Avatar
+0 forum 5

Hi Guys, I am trying to make a webpage using asp.net and SQL server 2008. Just a simple page through which data will be inserted to the database. But I noticed it is taking duplicate records as wel. So I used "Unique" constraint while the respective table and it is working fine. But I wanted to show an error message which says "DATA already exists" after I am clicking the Insert button on the page. Is it possible to check for duplicate entries and show the result while we are inserting data to a database? Please help with a code …

Member Avatar
Member Avatar
+0 forum 2

I was very tired of searching, but I did not find anything i have a from and its minted textbox and CheckedListBox the CheckedListBox have five choices and i want to insert the Items(more than 1) Checked from the CheckedListBox and the textbox into a table in the database like this con.Open() cmd.Connection = con cmd.CommandText = "insert into users ( user_name,pass_word,premation) VALUES ('" & TextBox1.Text & "','" & TextBox2.Text & "','" & CheckedListBox1.Text & "')" cmd.ExecuteNonQuery()

Member Avatar
Member Avatar
+0 forum 20

Apparently I don’t know how to insert a row into a MySQL data base using PDP and I would like to know what I am missing This PHP PDO script does not insert data into a database. I would like to know why. It does not error out but the data base is not populated and the return value is apparently undefined. Below is the table: CREATE TABLE animals ( Id INT(11) NOT NULL AUTO_INCREMENT, animal_type VARCHAR(32) DEFAULT NULL, animal_name VARCHAR(32) DEFAULT NULL, PRIMARY KEY (`Id`) ) ENGINE=MYISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; Below is the PHP script: <?php /* mysql hostname …

Member Avatar
Member Avatar
+0 forum 5

#include <iostream> using namespace std; //Linked List: Delete a node at nth position struct Node { int data; Node* next; }; Node* head; //Global void Insert(int data) { //Insert an integer at the end of list Node* temp1 = new Node; temp1->data = data; temp1->next = head; head = temp1; } void Print() { //Print all elements in the list Node* temp1 = head; while (temp1 != NULL) { cout << " " << temp1->data; temp1 = temp1->next; } cout << endl; } void Delete(int n) { //Delete node at position n Node* temp1 = head; if (n == 1) …

Member Avatar
Member Avatar
+0 forum 3

Is it possible to select values from 2 columns in order to calculate another column in the database table?

Member Avatar
Member Avatar
+0 forum 1

Hello, I have the below case. CREATE TABLE "PRBT"."TM_TABLE_1" ( "NID" NUMBER, "STRNAME" VARCHAR2(240 BYTE) NOT NULL ENABLE, "NORDERCODE" NUMBER NOT NULL ENABLE, "NSTATEID" NUMBER DEFAULT 1 NOT NULL ENABLE, "STRDETAILS" VARCHAR2(256 BYTE) DEFAULT NULL, "STRAUTHOR" VARCHAR2(128 BYTE) NOT NULL ENABLE, "NPICTUREID" NUMBER DEFAULT NULL, "STRLATINNAME" VARCHAR2(512 BYTE), "STRLATINAUTHOR" VARCHAR2(512 BYTE)); CREATE TABLE "PRBT"."TM_TABLE_2" ( "NID" NUMBER, "NUSERID" NUMBER NOT NULL ENABLE, "NITEMID" NUMBER, "NCOST" NUMBER DEFAULT 0 NOT NULL ENABLE, "DTCREATED" TIMESTAMP (6) DEFAULT SYSTIMESTAMP NOT NULL ENABLE, "DTEXPIRE" TIMESTAMP (6), "NTIMELIMIT" NUMBER, "LISDELETED" NUMBER DEFAULT 0 NOT NULL ENABLE, "LLOOPBACK" NUMBER DEFAULT NULL, "LISGIFT" NUMBER DEFAULT 0 NOT …

Member Avatar
Member Avatar
+0 forum 8

getting syntax error into insert i don't know why :( Private Sub Button1_Click(By Val sender As System.Object, By Val e As System.EventArgs) Handles Button1.Click If txtContact.Text.Trim.Length = 0 Then MessageBox.Show("Enter Contact Number.", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Information) Exit Sub End If If ComboBox1.Text.Trim.Length = 0 Then MessageBox.Show("Please Select Agent", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Information) Exit Sub End If If ComboBox2.Text.Trim.Length = 0 Then MessageBox.Show("Please Select Agent", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Information) Exit Sub End If If ComboBox44.Text.Trim.Length = 0 Then MessageBox.Show("Please Select Agent", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Information) Exit Sub End If Dim sqlCommand As String sqlCommand = "INSERT INTO Personss (names, contactnumero, emailadds, pages, projects, agents, sources, …

Member Avatar
Member Avatar
-1 forum 2

Hai. i'm beginner in php. Can someone help me to insert the calculated value into database. I'm trying to insert calculated value into database but it doesn't work. This is my code. <?php $ic=$_SESSION['ic']; $query=" SELECT * FROM form WHERE ic='$ic'"; $result=mysql_query($query); $record=mysql_fetch_array($result); $query1=" SELECT * FROM login WHERE userIC='$ic'"; $result1=mysql_query($query1); $record2=mysql_fetch_array($result1); ?> <?php error_reporting(E_ALL & ~E_NOTICE); $no1=$_POST[asal1]; $no2=$_POST[tuntutan1]; $tolak1=$_POST[baki1]; $tolak1=($no1-$no2); ?> <?php error_reporting(E_ALL & ~E_NOTICE); $no1=$_POST[asal2]; $no2=$_POST[tuntutan2]; $tolak2=$_POST[baki2]; $tolak2=($no1-$no2); ?> <?php error_reporting(E_ALL & ~E_NOTICE); $no1=$_POST[asal3]; $no2=$_POST[tuntutan3]; $tolak3=$_POST[baki3]; $tolak3=($no1-$no2); ?> <?php error_reporting(E_ALL & ~E_NOTICE); $no1=$_POST[asal4]; $no2=$_POST[tuntutan4]; $tolak4=$_POST[baki4]; $tolak4=($no1-$no2); ?> <?php error_reporting(E_ALL & ~E_NOTICE); $no1=$_POST[asal5]; $no2=$_POST[tuntutan5]; $tolak5=$_POST[baki5]; $tolak5=($no1-$no2); ?> <?php error_reporting(E_ALL …

Member Avatar
Member Avatar
+0 forum 1

<?php if (isset($_POST['import'])) { $fname = $_FILES['patientcsv']['name']; echo 'upload file name: ' . $fname . ' '; $chk_ext = explode(".", $fname); if (strtolower(end($chk_ext)) == "csv") { $filename = $_FILES['patientcsv']['tmp_name']; $handle = fopen($filename, "r"); $i = 0; mysql_query("START TRANSACTION"); while (($data = fgetcsv($handle, filesize($fname), ",")) !== FALSE) { if ($i > 0) { $docant = (addslashes($data[35]) != '' ) ? addslashes($data[35]) : addslashes($data[11]); $sqlquery = mysql_query("SELECT RecdNo FROM patient WHERE RecdNo='" . $data[0] . "'"); if (mysql_num_rows($sqlquery) > 0) { $query = mysql_query("UPDATE patient SET `price` = '" . addslashes($data[1]) . "', `ffpostleft` = '" . addslashes($data[2]) . "', `ffpostright` = …

Member Avatar
Member Avatar
+0 forum 1

I am trying To display the content of the table selected(Imported from MySql) in a JTable whose Structure is unknown to me . I Have Successfully added columns in Jtable but not Able to add rows which the ResultSet Object Returns. Please Help me Insert The Row DATA . I am Attaching the Code. private void btnDisplayTableContentActionPerformed(java.awt.event.ActionEvent evt) { try { String selTN=cmbTable.getSelectedItem().toString(); String r="select*from "+selTN; TableRecords= stmt.executeQuery(r);//TableRecords is a resultset object rsmd=TableRecords.getMetaData();//rsmd is a Resultsetmetadata object int n = rsmd.getColumnCount();// column no starts from 1 DefaultTableModel model=(DefaultTableModel)tblDisplay.getModel(); int i = 1; while(i<=n){ model.addColumn(rsmd.getColumnName(i));// columns suceesfully added i++; } while(TableRecords.next()) …

Member Avatar
Member Avatar
+0 forum 9

How to use one button to insert true into column Status and when clicked the second time will update column Status with false This is the table clicked the first time ====================================================== UserName | Status --------------------------------------------------------------- Steve1 | false ---------------------------------------------------------------- This is the table clicked the second time ============================================================ UserName | Status --------------------------------------------------------------- Steve1 | true --------------------------------------------------------- protected void btncount_Click(object sender, EventArgs e) { if (Session["UserName"] != null && Session["UserName"].ToString() != string.Empty) { string username = Session["UserName"].ToString(); Follow(username); } else { } public void Follow(string username) { string str = ConfigurationManager.ConnectionStrings["CONN"].ConnectionString; string getADPOST = "Insert INTO USERFollow (UserName,FriendUserName,Status) values (@UserName,@Id,1)"; …

Member Avatar
Member Avatar
+0 forum 1

how to create text box dynamically at run time in java and access each textbox value to insert in database.

Member Avatar
Member Avatar
+0 forum 1

Hello All. I'm trying to loop the following statement with PHPmyAdmin in order to add 1000 entries with the variable "i" incremented for each entry. (data and ip can be static) INSERT INTO 'TABLE'('id', 'data', 'ip') VALUES ([i], [06/03/2016],[192.168.0.1]) It's been 20 years since I've done any coding with loops. Can anyone help me?

Member Avatar
Member Avatar
+0 forum 3

I use this code to replace word file's some words with vb.net windows application text boxes values. 'use early binding Dim objWordApp As Word.Application = Nothing Try objWordApp = New Word.Application 'Open an existing document. objWordApp.Documents.Open("C/temp/word.docx") 'copy data to clipboard txtFirstName.SelectAll() txtFirstName.Copy() 'find <address> objWordApp.Selection.Find.Execute("<address>") 'copy richtext from clipboard objWordApp.Selection.PasteSpecial(DataType:=Word.WdPasteDataType.wdPasteText) 'clear the clipboard Clipboard.Clear() 'Save and close the document. objWordApp.Documents.Item(1).Save() objWordApp.Documents.Close(Word.WdSaveOptions.wdDoNotSaveChanges) Catch ex As Exception MessageBox.Show(ex.Message) Finally 'quit Word If Not IsNothing(objWordApp) Then objWordApp.Quit() objWordApp = Nothing End If End Try But Now I want to open and select word file by open file dialogue. Currently I coded where word …

Member Avatar
Member Avatar
+0 forum 1

Hello. I want to insert data into django db from a function in the **views.py** file. I'm using **linux**, **python 3.4**, **django 1.8.2**, **PyMySQL**

Member Avatar
Member Avatar
+0 forum 2

The End.