10,946 Topics

Member Avatar for
Member Avatar for asifjavaid

Hi all, Likewise in SQL Server, after every transaction, an error number is set to the global variable @@ERROR. So we easily make a check in SQL SERVER stored procedure, [CODE]IF @@ERROR = 0 SELECT 'SUCCESS' ELSE SELECT 'FAIL'[/CODE] How can I do the similar thing in MySQL. How can …

Member Avatar for cereal
0
134
Member Avatar for elcubanoluis

i have created a database on a temp site and i am making a form where uses can add or update information to the database that will then be displayed on a page in the site. Here is the code for the form: [CODE]<form action="leaderboard.php" mehtod="POST" /> <p>Points: <input type="text" …

Member Avatar for smantscheff
0
218
Member Avatar for strRusty_gal

Hi Everyone, Does anyone know how to set the schema so that it can stores chinese character. Thanks.

Member Avatar for smantscheff
0
41
Member Avatar for spectralbat

Hi guys, I'm in the process of learning PHP. I know the dribs and drabs and can kind of understand code when I read it, but I'm not to the point of being able to write an advanced script from scratch. I've been interested in chatbots and the concept AI …

Member Avatar for Tomy300
0
2K
Member Avatar for AngieS

Ok, I feel like I'm so close, but could use some help. I am trying to retrieve data from mySQL database via use of a form with checkboxes. This form is working somewhat except that it is only pulling one selection, not all that are selected. Can someone look at …

Member Avatar for diafol
0
112
Member Avatar for naveedqadri

Hi all Experts , I am converting my application from Oracle database to Mysql , i am facing alot of problems, some experts are really helping me , i am thankfull to all those how helping people like me. They actually encouraging us to do more n more. Thanks all …

Member Avatar for jbisono
0
113
Member Avatar for LRNPHP

Hi There, I have 2 tables, one with dst codes and one with fees. I want to match the fees with the dst code. I've been trying a for loop but it's not working 100%. What is the best way of matching dst code with the corresponding fee? If TABLE …

Member Avatar for LRNPHP
0
163
Member Avatar for DarkBerzerk

i have table in the database for login system [CODE]CREATE TABLE users ( username varchar(30) primary key, password varchar(32), userid varchar(32), userlevel tinyint(1) unsigned not null, email varchar(50), timestamp int(11) unsigned not null ); [/CODE] already have cart for things that doesnt need shipping, but its with JavaScript, [url]http://lasthunter.freehostia.com/rated-online/conf_files/js/simpleCart.js[/url] but …

0
277
Member Avatar for srikanth2321

Hello all, I have a problem in building the query for search. I have a table which contains a column X stores numerous values in each respective cell of a row. For e.g. [CODE] rows Column X 1 120;132;143;154;165 2 122;134;543;566; [/CODE] What I want to do is to make …

Member Avatar for aquanetta
0
124
Member Avatar for elcubanoluis

I have never worked with mysql. I need to design a few pages for a website that allows certain people to log into the page and be able to update or change the info manually without having to use any html editing software are any programs. How is this done? …

Member Avatar for pritaeas
0
103
Member Avatar for sam230

i have a date column where dates are saved in varchar format like this 17-03-2011 :: 11:19:48 i want to find last date through query.. please help thanks

Member Avatar for pritaeas
0
183
Member Avatar for nadnakinam

Hi to all, i need a help I have 2 tables namely subjects & marks. Subjects has 2 columns namely subject_id (PK), subject_name & class_id (FK). Marks has mark_id, student_id(FK), exam_id (FK), sub_1, sub_2, ... sub_n here sub_1, sub_2, ... sub_n are columns in 'Marks' table but actually they are …

Member Avatar for nadnakinam
0
156
Member Avatar for AbhishekBiswal

What I am upto: I am tryin' to develop a Blog CMS. There is a Database named blog in which there's a table named posts. The posts table has these fields: post_id, post_title, post_url, post_time, post_category, post_desc, post_username. Here, post_username is the username of the user who posted this post. …

Member Avatar for urtrivedi
0
197
Member Avatar for stoopkid

My table has 4 types of "r1": 'Standard', 'HD', 'HD + DVR', 'None' There are 3 types of "status": 'NTC', 'Repair', 'In Progress' All I am trying to do is retrieve all of the rows where r1 = 'Standard' and matches all three of the "status": [code] SELECT * FROM …

Member Avatar for smantscheff
0
112
Member Avatar for manish250

Hi all I am getting following exception in mysql db randomly. ** END NESTED EXCEPTION ** Last packet sent to the server was 1 ms ago. 11-9-2011 12:0:11 Exception in readFile Method in insertRecordInDataBasecom.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.io.EOFException STACKTRACE: java.io.EOFException at …

Member Avatar for manish250
0
235
Member Avatar for broj1

I have prepared an example of login page which displays a form with inputs for username and password and compares submited values with records in database. If match is found the user is redirected to another page, if not error message is displayed. This example is heavy commented. Hope it …

Member Avatar for broj1
3
778
Member Avatar for maydhyam

[B]Good Morning, I have a CSV file with thousands of rows of data, and I want to have this data uploaded into a table in a MySQL database. I also want an area where the file could be selected from the computer for the data to be uploaded. Could this …

Member Avatar for shailendra2614
0
534
Member Avatar for cthoes

ERROR UNABLE TO CONNECT TO DATABASE SERVER STORED BACKUP WHOLE WEBSITE IN HTDOCS AND IMPORT WHOLE DATABASE USING IMPORT IN MYSQL AFTER RUNNING [url]http://localhost:8888/[/url] ON LOCAL MACHINE ERROR MESSAGE :UNABLE TO CONNECT TO DATABASE SERVER ANY HELP WOULD HE HIGHLY APPRECIATED

Member Avatar for smantscheff
0
49
Member Avatar for rajesh1158

I have to design a database where one requirement says "For each project, for each user, for each skill, store the marks gained". Initially, i had a table where each skill was a column(proj_id, user_id, skill1, skill2, ......., skill_N) I felt this was a bad design because the number of …

Member Avatar for rch1231
0
187
Member Avatar for scrivomcdivo

Hey folks. I currently have a large JSON file made up of entries similar to the below. The file contains information relating to photographs:- [CODE]{ "SourceFile": "C:/Users/Me/Desktop/Photos/5294030805_9497032cd7_o.jpg", "ExifToolVersion": 8.63, "FileName": "5294030805_9497032cd7_o.jpg", "Directory": "C:/Users/Me/Desktop/Photos", "FileSize": "1094 kB", "FileModifyDate": "2011:09:09 22:40:39+01:00", "FilePermissions": "rw-rw-rw-", "FileType": "JPEG", "MIMEType": "image/jpeg", "JFIFVersion": 1.01, "ExifByteOrder": "Big-endian (Motorola, …

Member Avatar for Momerath
0
273
Member Avatar for pinkygirl

This is my code to hash [CODE]class hashing { private static $algo='$2a'; private static $cost='$10'; public static function unique_salt() { return substr(sha1(mt_rand()),0,22); } function hash($password) { return crypt($password,self::$algo.self::$cost.'$'.self::unique_salt()); } public static function check_password($hash,$password) { $full_salt=substr($hash,0,29); $new_hash=crypt($password,$full_salt); return ($hash==$new_hash); } }[/CODE] This is my login page [CODE]require("hashing.php"); $password=hashing::hash($_POST['txtPassword']); $checkPassword=mysql_query("SELECT * from …

Member Avatar for diafol
0
289
Member Avatar for zygimantelis

I scripting chating program in python... And i'm on chating program scripting auth with mysql. But no know how to script authentication on python-mysql. How to script chat auth program for chat with python-mysql. -- Sorry with English language.

Member Avatar for zygimantelis
0
215
Member Avatar for gava11

Hello, I know nothing about PHP and this error has come up and I've been researching for days and have tried just about everything. Hopefully, I've given you enough information, but can you tell me why this line: $row2 = mysql_fetch_assoc($res); is the one called up in the following error? …

Member Avatar for diafol
0
56
Member Avatar for pinkygirl

I want to upload images that will be saved in a folder. That folder is inside my website folder. eg: mywebsite(website folder). myimage(image folder). And the path of image should be saved in mysql. I tried the following but it is giving error "path not found." This is my path:- …

Member Avatar for pinkygirl
0
122
Member Avatar for kaizokupuffball

Hi! I got this messaging system on my website up and running now. But there is something i need to do when the user click the message they got. All the new messages are flagged as New! when they get the message. When they click on it, i got this …

Member Avatar for karthik_ppts
0
491
Member Avatar for himerus

This script will display a previous next script that will look like this: << prev 1 2 [b]3[/b] 4 5 next >> It is clean, and avoids large numbers of pages in the prev/next links [code=php] $server = "localhost"; $user = "username"; $pass = "password"; $databasename = "yourDBname"; $db = …

Member Avatar for Ezzaral
0
2K
Member Avatar for NeoNe

Hi to everyone I’m wondering how to make some simple checkbox for multiple data delete from mysql I found some tutorial on net but don’t work. I tested it without changing anything and doesn’t work. I’m wondering did programmer test it before he posted that tutorial ? Here is a …

Member Avatar for sammry
0
877
Member Avatar for dwlamb

Good day, I am getting an error on a log-in script: mysql_query(): 4 is not a valid MySQL-Link resource I've done some research on this and followed such advice as: [LIST] [*]ensuring the mysql connection is closed after the results have been returned [*]testing any sql strings I define in …

Member Avatar for Zexsz
0
181
Member Avatar for meisjen

Hey guys complete noob/novice here, Looking to join multiple tables identical in structure. It's meant for a search box in my school project. [COLOR="Red"]If I have table 1 and table 2 identical in structure, when the user searches for "keyword" it will search through both table 1 and table 2 …

Member Avatar for diafol
0
182
Member Avatar for darwin_nacional

Hi. Well, I am able to program in Java and connect it to MS Access and be able to distribute it as long as I have the *.mdb file together with the *.jar file. Now, I want to have my database on MySQL. I am already able to do it …

Member Avatar for Ezzaral
0
155
Member Avatar for vibhaJ

Hello All, I wand Firefox to remember my password when i login in phpmyadmin. But Firefox doesn't ask me to 'Remember password'. When i inspect phpmyadmin form using developer tool, i done see any trick. Secondly i also want in my website coding that when user log in Firefox don't …

Member Avatar for vibhaJ
0
1K
Member Avatar for marloagapay

hello am a newbie sad to say but i got a big problem regarding to the auto increment. i use innoDB for storage but somethinggoes wrong! i dont know why. whenever i input new data (such as name add and tel, member ID should increment by one) there is no …

Member Avatar for decade
0
203
Member Avatar for Sparhauoc

Hello there, newbie question here. My mySQL time is 6 hours fast, and I don't know why or how to change it. My computer is at the right time, so apparently mySQL does not get the time from it. Where do I change the time for mySQL?

Member Avatar for Sparhauoc
0
119
Member Avatar for ppetree

OK, I have a table that has: id (int), name (varchar), parent (int) If parent contains NULL it IS the "parent" otherwise it is the child of a parent So: id=1 name=Meals parent=0 Means the above record is a "parent" (there are 100's of parents). So far, so good? Next …

Member Avatar for ppetree
0
150
Member Avatar for tatarao25

hi every one, i am trying to store store procedure result into temporary table tried using DELIMITER $$ DROP procedure IF EXISTS `Merge` $$ CREATE procedure `Merge`() begin create temporary table table1 call sp1(); create temporary table table2 call sp2(); End $$ DELIMITER ; error :: Script line: 3 You …

Member Avatar for smantscheff
0
96
Member Avatar for tatarao25

hi every one, how to return table using functions i tried DELIMITER $$ DROP function IF EXISTS `test` $$ CREATE function `test`() returns table begin return (select * from users); End $$ DELIMITER ; error: Script line: 3 You have an error in your SQL syntax; check the manual that …

Member Avatar for d5e5
0
84
Member Avatar for manzoor.ilahi77

Please help me on this file upload. [CODE] <form id="form_2" action="files_upload.php" method="post" enctype="multipart/form-data"> <input type="hidden" name="MAX_FILE_SIZE" value="50000000"> File:<input type="file" name="file" class="input" maxlength="350"" /><br /> <input type="submit" name="submit" value="Upload File"> </form> [/CODE] [CODE]<?php if(isset($_POST['submit']) && $_FILES['file']['size'] > 0) { $fileName = $_FILES['file']['name']; $tmpName = $_FILES['file']['tmp_name']; $fileSize = $_FILES['file']['size']; $fileType = $_FILES['file']['type']; …

Member Avatar for sv3tli0
0
553
Member Avatar for httpgal

I'm having a little trouble writing an if statement to update a couple of database fields based on matching a student ID between 2 tables. This is a form where I pass the initial Student and Class IDs to the SQL statement (this works just fine, but when I try …

Member Avatar for pritaeas
0
165
Member Avatar for waqar3

[CODE]<?php mysql_connect("localhost","root",""); mysql_select_db("database_name") ?> <form name="search" action=""> Search: <input name="q" type="text" /><input name="search" type="submit" value="Search" /> </form> <?php if(isset($_GET['q'])){ // include database connection $sql = "SELECT * FROM article WHERE title LIKE '".$_GET['q']."' "; $exe = mysql_query($sql); while($row = mysql_fetch_array($exe)){ } ?> <table> <tr> <td> <a href="article_detail.php?id=<?php echo $row['id'];?>" class="header_menu"> …

Member Avatar for Ezzaral
0
174
Member Avatar for mhaselip

Hi All I would be greatfull if somebody could help me out with this one. ive been scratching my head all day in trying to find a solution. I have a order confirmation page which displays the entire order on a shopping cart. this page inserts a row into table …

Member Avatar for mhaselip
0
242
Member Avatar for Blasz

Hello, I am using the handle_options function in a client program written in C that is using the MySQL API. Considering there is no actual reference to this function (to my knowledge) except the book 'MySQL' (or something) written by DuBois, I'm asking for help here. So I want to …

Member Avatar for kathoneil27
0
246
Member Avatar for smantscheff

I just stumbled over this: [ICODE]mysql> select "abc" = 0; +-----------+ | "abc" = 0 | +-----------+ | 1 | +-----------+ 1 row in set, 1 warning (0.06 sec) mysql> show warnings; +---------+------+-----------------------------------------+ | Level | Code | Message | +---------+------+-----------------------------------------+ | Warning | 1292 | Truncated incorrect DOUBLE value: …

Member Avatar for pritaeas
0
313
Member Avatar for vampshay

hi someone help me with this error:( Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\CDX\class_lib.php on line 57 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\xampp\htdocs\CDX\class_lib.php on line 57 [CODE] <?php class contactdirectory{ private $db_host = 'localhost'; // Database …

Member Avatar for divyakrishnan
0
270
Member Avatar for johnniegee

I am reading data from a mysql db to my webpage. I wish to make a google pi-chart but have no idea how to pass the data from php (html?) to javascript(?) to populate the graph. I'm reading the rows into the html page ok, they are dispaying in a …

Member Avatar for Ichcha
0
212
Member Avatar for chris_j_haines

Hi I have an occasional problem with the following scripts Here is the file upload form [CODE] <?php session_start(); if(isset($_SESSION['username']) == false){ header("Location: login.php"); exit(); } if(($_SESSION['userlevel']) != 'admin'){ header("Location: login.php"); exit(); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> …

Member Avatar for stoopkid
0
178
Member Avatar for senergy

Good Day, I have troubles with compiling MySQL++ with Visual Studio 2010 Express edition, I've downloaded MySQL Complete Pack and installed Development tools (server, includes etc), downloaded MySQL++ 3.1.0 and runned vc2008 solution with my vc2010 and compressed it for 2010, I've included everything from MySQL folder and MySQL++ install …

Member Avatar for raptr_dflo
0
210
Member Avatar for network18

what;s wrong with this mysql trigger logically?? [CODE] DELIMITER | CREATE TRIGGER comment_count AFTER INSERT ON comments FOR EACH ROW BEGIN UPDATE sub_sections as t1 SET t1.published_comment_count = (select count(id) as cnt from comments where article_id=t1.id and published=0 and status=0) WHERE id= (select article_id from comments order by date_modified desc …

Member Avatar for Morta
0
217
Member Avatar for mownam

<?php include "db/config.php";?> <?php function loginCheck($username,$password) { $sql=mysql_query("select UserId, UserName, Password from user_login where UserName= '$_POST[username]' and Password= '$_POST[password]'"); $name=$sql['UserName']; //echo"hi".$name; //select * from user_login where UserName='mownam' and Password='welcome' $result =mysql_query($sql); //$uname=$_REQUEST["username"]; if(mysql_num_rows($result) > 0) { echo "<center>successfully logged<br />".$uname; } else { ?><div align="center" style="background-color: #FFFFCC"style="font:"Courier New" , Courier, …

Member Avatar for stoopkid
0
230
Member Avatar for siaswar

I installed mysql and apachi form fedora14 installation dvd when I installed fedora. no I want to run mysql interpreter for training mysql (I'm student). when I run mysql command I receive error: [CODE]$ mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)[/CODE] I looked …

Member Avatar for smantscheff
0
205
Member Avatar for Chitru

I don't know am i asking right question or not but my question is: I want to create a simple search site so I've team with different jobs. I have its database part to handle. I should create its database and i have not idea what should i do. I'm …

Member Avatar for anand01
0
87

The End.