10,938 Topics

Member Avatar for
Member Avatar for gunnarflax

Hi! I'm trying to create my own little community for learning purposes and I'm having some trouble with getting the data I want from the table. I'm not that high on SQL but I know the basics but when you get into the more complex mysql-lines I get lost. The …

Member Avatar for nileshgr
0
3K
Member Avatar for mattyd

Hello, I am brushing-up on SQL (using MySQL). It has been many years since I have worked with this and I'm having some trouble getting started. I have looked at a tutorial and entered the code below: [CODE]CREATE TABLE employees ( employeeNumber into(11) NOT NULL, lastName varchar(50) NOT NULL, firstName …

Member Avatar for mattyd
0
164
Member Avatar for ayesha789

Hi, this is my query [CODE]$result = mysql_query("SELECT SUM(`qty`) FROM sims_ac WHERE region ='North'");[/CODE] How I can show this [CODE]$result[0][/CODE] without using While loop or any other loop.

Member Avatar for scaiferw
0
19K
Member Avatar for srinivas88

Please help me..i m getting this error in vista... java.sql.SQLException:General error at sun.jdbc.odbc.createSQLException(JdbcOdbc.java:6986) at sun.jdbc.odbc.StandardError(JdbcOdbc.java:7114) at sun.jdbc.odbc.SqlExecDirect(JdbcOdbc.java:3110) at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbc.java:3110) at sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(JdbcOdbcStatement.java:288) ....etc there are 2 code pages..one is employee registration page and the details entered in this page is sent to EmpAddServlet.... [icode] import java.io.*; import java.sql.*; import javax.servlet.*; import …

Member Avatar for srinivas88
0
80
Member Avatar for deni_bg

Hello everybody, I want to write php script with classes, but I haven't enought knowledges. I want to delete multiple rows from mysql with chekbox, but I am wrong. I will be very happy if somebody responds me. This is my code function showNews(&$sHtml) { $sHtml.='<input type="submit" name="btnDel" value="delete"/>'; $aNews …

Member Avatar for deni_bg
0
147
Member Avatar for En-Motion

I'm currently linking two different tables in two different databases. One contains all the info from a product, while the othe contains information about the installation of the product. The SQL I use only returns those products that HAVE an entry in my install table, but many don't ie they …

Member Avatar for d5e5
0
110
Member Avatar for whiteyoh

Hi All, the following is a script to search using LIKE. i know data exists, but its simply not playing. any help on syntax corrections would be appreciated. regards paul [code] <?php if (isset($_POST['search'])){ echo $column = $_POST['column']; echo "<br>"; echo $param1 = $_POST['param1']; $srch = "%".$param1."%"; echo $SQL = …

Member Avatar for tomford
0
103
Member Avatar for kirtan_thakkar

This is a MySQL PHP question... how to count no of fields in a perticular database and in a perticular table?? I have three columns in a table :id , name , info I have to print the unique persons.. how could I?? How to code it in php?? Can …

Member Avatar for kirtan_thakkar
0
100
Member Avatar for kirtan_thakkar

How to print more than one results in a page?? I want to print 10 results per page and show next button if it have more than 10 results.. In the next button it will show another 10 results.. How to code it..?? And please explain the code if you …

Member Avatar for rajarajan2017
0
121
Member Avatar for anony

function gethotproperty($hot){ $gethot = "select p.reference_id, p.area, p.area_unit, p.transaction_type,p.property_type,p.property_name,p.address1,p.address2,p.city,p.locality,p.pincode,p.area_in_sqft,p.total_price,p.negotiable,". "p.rate_per_sqft,p.num_bedrooms,p.floor_number,p.intro_image_loc,p.amenities_detail, p.specification_detail, p.location_detail from " . DBConf::getDatabaseSchema() . "property p where p.hot = ".$hot; $result = mysql_query($gethot, $this->connection); $property = new Property(); while($row = mysql_fetch_array($result)){ $property->referenceId = $row['reference_id']; $property->transactionType = $row['transaction_type']; $property->propertyType = $row['property_type']; $property->propertyName = $row['property_name']; $property->address1 = $row['address1']; $property->address2 …

Member Avatar for rajarajan2017
0
181
Member Avatar for thomasbe

Hi everybody I need a help. codes below are written by someone else. I have a mysql database, html form to login to this database: [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>1</title> </head> <body> <h4>Please provide correct username and password:</h4> <form enctype="multipart/form-data" action="login.php" method="post"> Login: <input …

Member Avatar for thomasbe
0
118
Member Avatar for akand

Hi, I want to run some queries in mysql. Also, I want to automate this process. So can someone help me with shell scripting?? I want to open mysql in terminal, type in the password and give some queries.. Can I write a script for d whole thing??

Member Avatar for griswolf
0
60
Member Avatar for gazzy1

How can i create a php file that export my selected mysql database to a execel or csv form i have my own database named as "users" that have 10 tables i want to php file that export my "users" databse to ms excel and which when run on the …

Member Avatar for diafol
0
63
Member Avatar for zia zia

Hi Guys... I'm making a form with the ability to delete users. But don't know how to do it... My form structure.. users.php ---- Lists a user with options like edit user / delete user. (His details are displayed from database on my html page in a table.) For delete …

Member Avatar for therest
0
1K
Member Avatar for zia zia

Hi Guys! I want to know how to limit the no of records to be shown in dropdown list from mysql.Below is my code. I just want to list 4 records from colum name 'department_name'. The colum has 11 records in total. [CODE]<select class="ac" name="area" > <?php $qry = mysql_query("SELECT …

Member Avatar for zia zia
0
105
Member Avatar for alfredtiu

Hi everyone, can you check for me if my codes below are correct? i am having problem to retrieve my image file from mysql database. The errors start at "header" parts. I have no problem to store image file (mediumblob) in mysql database. The file shown are in HEX forms. …

Member Avatar for kalpanasarvan
0
346
Member Avatar for kurky17

Hi, I'm actually drafting a MySQL query to be fed into Jasper Reports, and since I can no longer manipulate the resulting data in PHP as it will automatically be translated into a chart by jasper, I need my mysql statement to be able to generate what I need on …

Member Avatar for kurky17
0
197
Member Avatar for herberwz

Pls help: [B]Warning:[/B] require(connect_to_mysql.php) [function.require]: failed to open stream: No such file or directory in C:\wamp\www\chibenda\root_directory\index.php on line 3 [CODE]<?php $db_host = "localhost"; // Place the username for the MySQL database here $db_username = "root"; // Place the password for the MySQL database here $db_pass = ""; // Place the …

Member Avatar for drjohn
0
147
Member Avatar for aMOEBa

I need to write a method to return the number of rows I have in my table. This code I've written so far; [code] <pre><?php class Database { private $connected=false; private $user,$pass,$host; private $db; private $result=array(); public function initialize($user, $pass, $host) { $this->user=$user; $this->pass=$pass; $this->host=$host; return $this; } function connect($dbname) …

Member Avatar for aMOEBa
0
93
Member Avatar for aarya

hi i am trying to insert into mysql databse using jsp.but i am getting the error as [CODE]An error occured between lines: 38 and 47 in the jsp file: /jsp/havyaka/register.jsp Generated servlet error: C:\tomcat\work\localhost\examples\jsp\havyaka\register$jsp.java:102: Incompatible type for declaration. Can't convert int to java.sql.ResultSet. ResultSet rs = statement.executeUpdate("insert into havyak(usercode,password,email,name,phone,add1,add2,add3,add4,country) values('" …

Member Avatar for gauravleoheart
0
430
Member Avatar for andydeans

Hi, got some help from tesu on another thread but i am struggling to get this working. my individual query returns 2 results which is correct from the database. however when i try it with a view joining the multiple table with same query it returns 2 results but only …

Member Avatar for andydeans
0
175
Member Avatar for ramzmail

Is it possible insert datas of excel file [.xls] to the mysql? Not CSV file, please post me a coding...

Member Avatar for vibhaJ
0
62
Member Avatar for whiteyoh

Hi All, Ive just imported two CSV files into phpmyadmin, but i need to add an auto increment field into it, and then populate it. Any advice on how to do this would be appreciated

Member Avatar for vibhaJ
0
80
Member Avatar for benhowdle89

I'm developing a very simple VB app in Visual Basic 2008, where i have a textbox being dynamically updated with a value every second, i need this value to be inserted into a mySQL DB, i have made the connection ok but not too sure how to structure the VB …

Member Avatar for Oxiegen
0
105
Member Avatar for andydeans

Hi, I am setting up a notes table, and wondered what the best type would be? Currently i have set it to Varchar with length 500 Would that take up more space than say a Lontext type in the database? Thanks

Member Avatar for andydeans
0
5K
Member Avatar for andydeans

Hi, I got some great help on the forum to create my total due query. However it produces it with just total due, how could i have it by month? each table has a DueDate column which i would like to show on the query along with the users FullName …

Member Avatar for andydeans
0
239
Member Avatar for andydeans

Hi guys, Need some help here. I have created an individual query for each product which works absolutely fine. However i want to be able to join it so i can display on my page who is due for a review. [CODE]SELECT clients.*, protection.* FROM (clients JOIN protection ON protection.clients_ClientID=clients.ClientID) …

Member Avatar for andydeans
0
111
Member Avatar for AbhikGhosh

Hi I am using tomcat 5.5 and I am unable to connect to mysql server(Wamp2.0i). Here is my code: [CODE] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@ page import="java.sql.*"%> <%@ page import="java.io.*"%> <html> <head> <title>Connection with mysql database</title> </head> <body> <h1>Connection status</h1> <% String connectionURL = "jdbc:mysql://localhost:3306/names"; Connection …

Member Avatar for AbhikGhosh
0
159
Member Avatar for SalientAnimal

Hi Can anyone please tel me why my code is not updating my MySQL database? The code does not return any errors. It does how ever tell me that the update is successful, but there is no update. Pelase let me know should you require to view the code running …

Member Avatar for SalientAnimal
0
229
Member Avatar for pgmarco

Hi, I am somewhat new to PHP and MySQL and I am having a little trouble with what I want to do, which is assign a cell for each option selected and a price or insert the price into MySQL table depending on the option selected. Whichever is easier or …

Member Avatar for sergb
0
170

The End.