10,932 Topics

Member Avatar for
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
83
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
549
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
163
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
171
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
232
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
243
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
312
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
265
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
210
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
170
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
205
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
216
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
229
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
204
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
84
Member Avatar for Paaat

Hey, I'm having a problem executing the following code: [CODE] <?php session_start(); require('connect.php'); if($_POST['username'])){ $name=$_POST['username']; $checkUsername = mysql_query("select * from users where UserName='$name'"); if(mysql_num_rows($checkUsername){ echo 'Logged in successfully!'; $_SESSION['username'] = $name; } else{ echo 'The username or password you've entered is not valid!'; } } ?> [/CODE]

Member Avatar for Paaat
0
88
Member Avatar for mary_forum
Member Avatar for Smurf_UK

Hi All, I am new to the site, and also to PHP and MySQL, so please go easy on me for asking what may be an obvious question for many. I am wanting to store the data from a sign-up form in a MySQL DB, but I cannot get my …

Member Avatar for Morta
0
3K
Member Avatar for samsnov

Please can someone tell me what are things that I should add to my database, do I add my website pages to my database too ?,please I am sorry for this question I don’t know anything.

Member Avatar for debasisdas
0
31
Member Avatar for naveedqadri

Hi All experts, I am facing problem with mysql view. I have migrated my database from oracle to mysql qith views, View on Mysql is created , but when i try to execute query it takes a long timw , some times it time qout server connection, Any body help …

Member Avatar for debasisdas
0
249
Member Avatar for coolsasuke

Hello , I would like to enquire if how could I put MYSQL Row to a TextBox ? Here is my code [CODE]Private Sub Form1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load MySqlConnection = New MySqlConnection MySqlConnection.ConnectionString = "server=localhost;Port=3306; user id =root; password=****; database=visualbasic" MySqlConnection.Open() Dim Myadapter As …

Member Avatar for coolsasuke
0
202
Member Avatar for vampshay

i have this code to create a contact directory and my instructor wants me to create a function for database connect to minimize the coding and if an instance to change the server it is easy to change. <?php if(isset ($_POST ["add"])){ $name = $_POST['name']; $address = $_POST['address']; $email = …

Member Avatar for vibhaJ
0
112
Member Avatar for kishan4u1

i am building a simple online portal and i have done all the login ,registration pages and all the fields successfully get uploaded in the database but now all i got is a product display page and an shopping cart 1. i want help is how do i pass the …

Member Avatar for mulkave
0
285
Member Avatar for rom.

After updating mysql from 4 to 5, I'm now getting this error: [CODE]Invalid SQL: SELECT HRS.Hrs AS Val, HRS.Job_ID, TS.Staff_ID, Staff.First_name, Staff.Last_name FROM Timesheets AS TS, Timesheet_hrs AS HRS LEFT OUTER JOIN Staff ON (TS.Staff_ID=Staff.ID) WHERE TS.ID=HRS.Timesheet_ID ORDER BY Staff.First_name, Staff.Last_name, HRS.Job_ID DESC: 1054 (Unknown column 'TS.Staff_ID' in 'on clause')[/CODE] …

Member Avatar for rom.
0
289
Member Avatar for eman neercs

Have 2 tables - one for new titles and the other for authors. I want to tag the "new titles" table with the "author" value if the author's name appears in list of new titles. As you can see from my code, I don't have a clue what is wrong …

Member Avatar for sv3tli0
0
111
Member Avatar for asif49

I've been trying to test out my first website on the following free hosting service for the moment: [url]http://members.000webhost.com/cpanel.php?accountID=6800891&login_hash=xakt1MTI3NQX1Q1z[/url] and it seems that the mysql connection isnt working. I get the following errors... [CODE] Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'Myname'@'10.1.1.34' (using password: YES) in /home/a3793016/public_html/reviews.php on line 35 …

Member Avatar for sv3tli0
0
146
Member Avatar for rpv_sen

Hi i want to generate barcode for each bill. any one can help me. barcode will be alphanumeric(dynamic).

Member Avatar for rpv_sen
0
305
Member Avatar for konradhoppe

Hi community, I have a problem with an application which makes use of a mysql database. I have a class which saves the fields of every record on the table. One of the columns is of type Datetime. Sometimes (!) I query this column and get results like with a …

Member Avatar for ywang
0
342
Member Avatar for lordjordysmith

i have been looking everywhere for an answer to this and i still havent found one that works what i want to be able to do is display the details of the user that is logged in but instead it shows the whole database here is my code: [CODE=php]<?php require('authenticate.php'); …

Member Avatar for lordjordysmith
0
1K
Member Avatar for Tekkno

I have around 20 tables in my database. I want to count every row of every table using COUNT and get a total. I have tried doing a separate select statement for each table then using UNION but I cannot find a way to join the results to get just …

Member Avatar for Oca13th
0
193

The End.