10,946 Topics
![]() | |
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. | |
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 … | |
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 … | |
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 … | |
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 = … | |
![]() | 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 … ![]() |
![]() | 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 … ![]() |
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 … ![]() | |
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 … | |
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?? | |
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 … ![]() | |
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 … | |
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 … | |
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. … | |
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 … | |
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 … | |
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) … | |
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('" … | |
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 … | |
Is it possible insert datas of excel file [.xls] to the mysql? Not CSV file, please post me a coding... | |
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 | |
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 … | |
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 | |
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 … | |
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) … | |
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 … | |
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 … | |
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 … | |
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 … | |
Hey there, I have a code to remove the duplicates in one of my table but I cant seem to be able to ORDER the way mysql select the values. Here is my initial table: [url]http://img196.imageshack.us/img196/2421/tablesw.jpg[/url] [CODE]mysql_query("CREATE TABLE new_table as SELECT * FROM test GROUP BY url") mysql_query("DROP TABLE test") … ![]() | |
I am developing a website related to network marketing which has a binary incentive scheme. i want a code which shows the downline of a member. a member can have 2 downlines and those downlines can have downlines as well. so i want a code which shows all the downlines. … | |
I am working on an page that will print scheduled classes and appointments after querying a databse for them. Right now I'm trying to store the names of people with appointments in an array so I can print it after adding the classes as well. I've gotten stuck on this … | |
Hi, need help with inputing images to mysql. I read lots of previous thread about it but couldn't find the proper answer. this is code for my basic form: [CODE]<form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>" enctype="multipart/form-data"> <table width="100%" border="1" cellspacing="1" cellpadding="1"> <tr> <td>tytul</td> <td><label> <input type="text" name="tytul" id="tytul" … | |
hi guys having a problem getting a single value from a mysql query getting all sorts of problems - heres my latest version below [code=php]mysql_connect($host,$user,$password) or die( "Unable to select database"); mysql_select_db("mydatabase"); // select database to use. $user = 84; $sql1="SELECT `order_id` FROM `table1` WHERE `user_id`= '$user'"; $array = mysql_fetch_array('$sql1'); … | |
While attempting to use my forum posting system, I received a mysql error that said to look for the correct syntax to use around '' on line 1. I attempted to reproduce the error but was unable to do so. Any ideas on what cause this and how to prevent … | |
I have 3 tables. Here is the relevant information needed for each. items ------ prod_id order_id item_qty orders -------- order_id order_date order_status acct_id accounts ------- acct_id is_wholesale items is linked to order by the order_id and orders is linked to accounts via acct_id I need to sum item_qty for all … | |
Hi, I need help for this problem that i'm trying to solve for a while. How do i submit the value into database and view value ? Here's the code: [CODE] if ($id_pac && $id_rej && $data && $id_kon && $lekarz) { // tworzymy zapytanie $id_mat = (isset($_POST['id_mat'])) ? 1 … | |
Hi guys, Need help on backing up mySQL database for a specified period of time. | |
Hi, I'm trying to make a rather simple Visual Basic app with which I can update some tables within my MySQL databases. I've been following [URL="http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-3"]this tutorial[/URL] from page 3 on, as the first 2 pages where on how to initialize a local MySQL database. My MySQL database is on … | |
![]() | I have created one php file which open a mysql database in my local system... I want to know that i have created a database in PhpMyAdmin.. What would be the user and password.. And how to run that php file.. Can I run it in a web browser to … ![]() |
hi guys really i don't know what im doing wrong... i am trying to process multiple radios with mysql. the first step has involved me echoing the results on the process page. each time i select any radio option it simply displays the first row result. this is that i … | |
[CODE]<?PHP $results = mysql_query("SELECT * FROM messages, comments WHERE messages.user_on='$user2' AND comments.msg_id_fk = messages.msg_id ORDER BY messages.msg_id, comments.com_id DESC") or die(mysql_error()); ?>[/CODE] | |
Hello Guys... I'm a novice in both php/mysql. I'm creating an application and have many problems with it.I need help with some of the areas. First my application is a multiple forms based. The first page is that an admin logs into it by authenticating with mysql (This part I've … | |
![]() | Hi, I am beginner in PHP and MYSQL ... Before using mysql i have created database in text files.. Now I have to convert it into the table of mysql database.. The things i want to do is .. first open the specific folder and into that open the sub … |
![]() | Hi, I am beginner in PHP and MYSQL ... Before using mysql i have created database in text files.. Now I have to convert it into the table of mysql database.. The things i want to do is .. first open the specific folder and into that open the sub … |
I am trying to populate a dropdown list using <select><option> and on the selected option pass the values to another page. I have been trying a lot of things over the las two days and I have finally decided to go to the community for assistance. The data is displayed … | |
G'day, I've got a small problem. As all who post here usually do. I've got my table [CODE]CREATE TABLE IF NOT EXISTS `attractions` ( `attID` int(11) NOT NULL AUTO_INCREMENT, `attName` varchar(255) NOT NULL, `adultPrice` double NOT NULL, `childPrice` double NOT NULL, `referenceID` int(11) NOT NULL, PRIMARY KEY (`attID`), UNIQUE KEY … | |
Hello all :) Me and a friend of mine we are working in a project at the moment. We populate our database each one with his own data but now we need to merge our tables. The database has the same name in both machines, and also table name. I … | |
I am trying to create a set of league table in MySQL and PHP. I can get the tables to show the top and bottom 5 values but the problem is when I have less than ten records in the system. When this occurs the same people can appear in … | |
Hi all, I am a php rookie. I like to get a PHP function returning an array which gets a string(search query) and db results(an array) as arguments. This array should be sorted in ascending (alphabetical) order with search query positions. I tried of querying the results but i struck … |
The End.