10,946 Topics
![]() | |
i wanted to create a gui java program that reads info from MySql then output it in a JTable. but i first tried to use the JTable because it was my first time to use it. It worked perfectly but when i tried to read from the database it doesn't … | |
Hey, I need to get the last ID from my mysql database and add +1 to it. I saw this mysql_insert_id(); but it looks like it only gets the last insert id? But what happens if the last query was a different table? Dan | |
What is mysql injection and how is it done? Please help me with an example | |
<input type="button" name="b2" value="Delete" onClick="<? $delQuery = 'DELETE FROM artist_schedule WHERE artist_schedule_id=.$artistID'; $result=mssql_query($delQuery,$con); ?>"/> ------------------------------------------------------------ when i echo $artistID i get the value. how do i delete using a javascript button onClick ?? if using function also then how do i implement the function ? | |
I have Date in format: 12, August, 2011 and Time : 09:11:02 I am using following for Date [CODE] date("j, F, Y"); [/CODE] and following for time [CODE]strftime("%I:%M:%S")[/CODE] How to create database and insert date & time as it is into MySql ? | |
Hello everybody I'm working on MySQL I always have to use the Count function like this: [CODE]$Q = mysql_query("Select count() from tableA",$connection);[/CODE] How can I handle this query? How can I handle the number returned by this query?? Thanks. | |
i don't know why my firefox browser executing mysql query two times. and this is happening only with firefox. i have tested the code with chrome and opera and its working fine. now i have tested simple php code . this one [CODE]mysql_query("insert into test('1','12345')");[/CODE] just this code and i … | |
[CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cmc; import java.sql.*; /** * * @author Sahil */ public class signup { String fn,ln,un,pwd,cpwd,dob,sex,email,sec,secans; String emp,colg,skul,relstat,fammem,fam,con,country,state,city,pin; Connection cn; Statement st; int i,j,k; public int getI() { return i; } … | |
in Microsoft sql server 2005 or later,it is easier to generate unique numbers using the database server directly. you only specify the IDENTITY specification say 10000 and an incremental value say 1. this will generate numbers from 10000 upwards and at no time a number can be repeated or used … | |
After installing xampp, when i try to stop mysql and apache for restart it does not start.It gives error: mysql can not be stopped.Busy!Please help. | |
![]() | I have 3 MySQL database 1 is friends, 1 is dashboard and 1 is user what i want is to do a recurrng loop to display all of dashboard, except if you are friends with them. I have this: [CODE=php] $queryy = mysql_query("SELECT * FROM dashboard ORDER BY time DESC … |
Hi all, I like to rename my table's column. My table name is: utf8_Alter Field: Branch In the Branch field I have few columns name I tried to change the name with this query: But it didn't work. [CODE] ALTER TABLE `utf8_Alter` CHANGE `ゴルダーズグリーン` `ーン ノースãƒãƒ³ãƒ‰ãƒ³` varchar( 64 ) MySQL … | |
I am a newbie, really need your help. I've been working on this for 2 days and can't get it to work correctly. I have a form that I want to submit to the database "New Lead" form. I am using the submodal feature for the customer notes. For some … | |
My issue is that this: [CODE]mysql -u root -p newdb -e "UPDATE newdb_users SET user_login='newuser', user_pass='$P$BJ7HEXzUXBqB74hw0H9KD2QvdnlwGv1' WHERE user_login='admin';"[/CODE] does not update the "user_pass" field, but entering this: [CODE]UPDATE newdb_users SET user_login='newuser', user_pass='$P$BJ7HEXzUXBqB74hw0H9KD2QvdnlwGv1' WHERE user_login='admin';[/CODE] directly in the MySQL console does. What am I missing? | |
[CODE]<table width="100%" align="center" border="0" bgcolor="#FFFFFF"> <tr height="30px" style="color:#000000;" > <th>Unique ID</th> <th>Username</th> <th>Form Name</th> <th>Name</th> <th>Mobile</th> <th>DOB</th> <th> </th> </tr> <? /*$username="username"; $password="password"; $database="your_database";*/ mysql_connect('locahost', 'username', 'password') or die(mysql_error()); mysql_select_db('database') or die(mysql_error()); $query="SELECT * FROM table_name WHERE user_id='username'"; $result=mysql_query($query); $num=mysql_num_rows($result); mysql_close(); $i=0; while ($i < $num) { $form_id=mysql_result($result,$i,"form_id"); $form_name=mysql_result($result,$i,"form_name"); $username=mysql_result($result,$i,"user_id"); $first=mysql_result($result,$i,"first"); … | |
hi, since i have shifted my host these weird characters showed up on website! "ââ" i checked database, they are as it is written there. so when i call something through query they showed up too makes it worse, removing them manually is quite difficult. so please if anyone could … | |
Hello everyone, I have to query a table according to the current item being fetched in the select statement. What I meant, I want to form the name of the table and query it on runtime. For example, there is an item that comes from items table and it has … | |
Hi All, Sorry if this annoyed any of you. but I'm really indeed. I need to know on HOW TO LOAD 300 RECORDS OR DATA PER SECOND in my mobile apps (for this purpose, I use iOS app). I just need a sample or basic code on how to run … | |
This is a very newbie post. I think I'm just missing something. Anyway. I'm trying to display the contents of one column's field (not column name) specified by the contents of another filed in the same row. Here I show you my table and what I need: [code] Enter password: … | |
Hi I have a table storing time-sheet data, including a start & end time. I've set those fields as 'TIME' format, and tried doing the following calculation [code] SELECT SUM(log_end - log_start) AS timetotal FROM time_logs WHERE log_client = 'ECDC' [/code] It returned an integer, which doesn't correspond with any … | |
Hi there, My knowledge on query optimization ends here. I am stuck! My table with following structure has more than 1 million records. CREATE TABLE `dreambank`.`db_ip_data_buffer` ( `ip_from` bigint(20) unsigned NOT NULL default '0', `ip_to` bigint(20) unsigned NOT NULL default '0', `country_code` varchar(2) default NULL, `country_name` varchar(64) default NULL, `region_name` … | |
I am receiving the following error: Notice: Undefined offset: 1 in /home/content/53/7382753/html/Summer/wootsummer.php on line 68 Error, insert query failed on my code that is live at [url]http://obsidianpunch.com/Summer[/url] The offending line is [code]$topnow=$top[$countforme];[/code] however $top and $countforme are defined, so I am not sure why this is causing an error. Any … | |
i am an IT student and i have this idea of using a listview to see all the items i have in my database and to list all the items that has been selected into a listbox. The problem is i don't know how to get those selected items that … | |
Update spot_price set location = ‘PATAN’ where symbol = ‘CASTORP’ and polling_date between ‘20110730’ and ‘20110806’ Giving sql syntax error. Same query i am using to update another table in sqlserver its working but not in mysql | |
I'm thinking a databases that have scheduled time and date and if the computer time have been match to the scheduled time on the databases the other computer will be automatically shutdown | |
I'm missing something stupid so I need another set of eyes. I have a session value set that's a group concat of a few ids and I want to check to see if an id found by a query is in that group concat. The group concat variable is $session_unitidgrouping … | |
I want to send my information on a database. just wondering if I could use MYSQL? If its not possible, can I use JavaScript to send it on Java and make it work on MYSQL? | |
hi, looking for some tips, using dreamweaver as my tool and wondering if someone could help. i basically have 2 tables. 1 which is partsused and the other stocklevels. the stocklevels contains stock details and also if it is in the van or unit. on my page i have an … | |
I'm using Microsoft tags to get the cell phones unique "did' number loaded into a htm form field. The customer is then asked to enter thier email address on the form. The form is then submitted to be added to our customer mysql database. If it's new it is added … | |
How am i supposed to insert a word into a blank row? [CODE]$sql = "INSERT INTO ue-userfile WHERE id='$imageid' AND userid='$userid' (`albumname`) VALUES('$newalbum')";[/CODE] ? [CODE]$sql = " INSERT INTO `ue-userfile` ( ``, ``, ``, ``, ``, ``,``,`albumname` ) VALUES ('{$albumname}')";[/CODE] ? God damn annoying to not find any solution on … | |
Ok, so what im trying to make is an authentication system that gives the user the pin. I have all currently generated pins setup in a mysql database that looks like this.. [img]http://img847.imageshack.us/img847/3621/databaset.png[/img] So now i need to display them, and then after its displayed on the page, i want … | |
Hi I would be greatfull is somebody could help me. Ok vut a long story short I am trying to create a website which has the facility of a database driven banner system, on either left and right hand side of any page. the purpose of this is so that … | |
[CODE]<?php $login = $_POST['login']; $nickname = $_POST['nickname']; $senha = $_POST['senha']; $email = $_POST['email']; $conexao = mysql_pconnect("localhost","rodrigue_incub","xxx24df") or die (mysql_error()); $banco = mysql_select_db("rodrigue_incubadora"); //Utilizando o mysql_real_escape_string voce se protege o seu codigo contra SQL Injection. $login = mysql_real_escape_string($login); $nickname = mysql_real_escape_string($nickname); $senha = mysql_real_escape_string($senha); $email = mysql_real_escape_string($email); $consulta = mysql_query("SELECT * … | |
hi guys, I am developing a website, and it needs people to upload images. I can write code for single upload but not multiple, please help. Thanking you in advance! | |
Hi, how can we reduce the time of query execution time? I m using mysql. I have to execute one query which select data from lot of tables . It takes more time to execute. Please give me good suggestion for this....... | |
Hi, i'm trying to update a mysql table with values, and i get this error: Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE StockID= 23' at line 1. Here is my … | |
hi I'm need changes in my code. I'm display records by search. but i want to export those search records into excel, PDF, and word format. I'm creating only export to excel format. but it exports all rows in entire table. i need only that searching records to export. See … | |
Hi I am trying to display the records Horizontally from my 3 different table 1. place table - n number of place 2. Item name 3. Item in different place i want to display the above report as in the attachment. please help me to resolve the issue [CODE]<table width="100%" … | |
Hi all been working on this for a couple of days. I want to upload 4 image names to the mysql database and upload the images to a folder on the local server. I also want to display my images that goes with the text data. So far I can … | |
I restart a project of mine which use mysql, I used xampp in the past to test the code on the mysql server so I update to lasted version but a piece of code that is identical and was working, I now get an error in [U]the class check in … | |
I am very new to php and mysql. I have read and re-read many forum posts on this subject, but I just cannot figure this out. I have been at it for almost two weeks now. This is my hope: Load images and captions from a database into an html … | |
I hope I can explain this. I have a table which contains a field named ID. This is set as PRIMARY. Because users registered on my site and after that deleted their accounts (so a lot of rows got deleted, too) the table rows now are jumping, for example, from … | |
I'm trying to create a form where I can type in a piece of news as I would normally type and include links in the form [CODE]<a href="www.google.com">google</a>[/CODE] and have it preserve the formatting and display the link as a link when echoing back. My problem is that despite a … | |
New to PHP and need some help with this. I'm creating a test, but I'm getting all of my questions randomly from my database. For example, if this is my table: ID S Q1 A1 A2 1 C Why A B 2 F When A B I know that I … ![]() | |
Hello! please i need help with this,after sumiting my form i get this error message on line 111 any help i will appreciate, thx [CODE]<?php session_start(); include("../Connections/recruit.php"); echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; //check certification $certification = $HTTP_POST_VARS['certification']; if($certification != "accept") { echo(" Your application has been terminated as a result of … | |
I have the following code. [CODE]$result = mysql_query("SELECT * FROM topics LEFT JOIN quiz ON topics.managerId = quiz.managerId WHERE quiz.userId = '$userId' AND userId= '$userId' AND $egroup = 1 GROUP BY topics.title")or die(mysql_error()); while ($row = mysql_fetch_array($result)){ echo "{$row['quizId']} <br />\n"; echo "{$row['title']} <br />\n"; echo "{$row['passState']} <br />\n"; } … | |
please tell me how to convert a sql file which contain a table into .csv file in sql please tell me whether there is any c program to do this conversion or any other program insql for doing this | |
Hi I am trying to write a stored procedure which will execute a query and if resultset is not empty results will be inserted into a table passed as the second parameter to the procedure. Below is what I wrote but I am having error with declaring the cursor, any … | |
I've just removed and reinstalled mysql on my Amazon EC2 server. When I went to change the root password on the new install: sudo /usr/bin/mysqladmin -u root password 'MYNEWPASSWORD' I get an access denied error: error: 'Access denied for user 'root'@'localhost' (using password: NO)' Has it held onto the old … | |
Hey everyone, PHP and MYSQL newbie here.....can really use your help right now. I implemented a Submodal into my script, and finally got it to submit "User Notes" into the database. Unfortunately with each new submission, the text that is submitted overwrites the previous submission. I was told to use … |
The End.