10,940 Topics

Member Avatar for
Member Avatar for saadi06

Hi, I want to know that how can I get the timestampdiff return as zero instead of null. For example I have a query in which both dates are exactly same but the query returns me null instead of 0. My query is SELECT (TIMESTAMPDIFF(HOUR,'2012-12-01 11:15:00','2012-12-01 11:15:00')) And this code …

Member Avatar for IIM
0
659
Member Avatar for Indians

i stored few values through input form. (for example tax and rate field) if i entered tax = 777.77 and rate = 10000 it stored the details to db successfully. retrieve function also done successfully. but i want to show add these two values(tax+rate = total) from db when i …

Member Avatar for diafol
0
215
Member Avatar for Indians

i have the db with serial no and reference no. serial no is auto_increment value. it is worked perfectly. but i want ref no column also as auto_increment value start with 0000001,0000002,0000003...., how to do that? i cannot able to add two auto_increment values in mysql.

Member Avatar for paulkd
0
234
Member Avatar for garyjohnson

OKay so this my have been asked before but I have more of a general question than an issue. I don't understand Mysql_num_rows() becuase I don't have any information within my database table so the number or rows should be 0 but what happens is I get an error and …

Member Avatar for diafol
0
120
Member Avatar for garyjohnson

I can not access the database with Mysqli_connect(). I have all the correct information into the funciton but it wont let me. This is the syntack that I use $link = mysqli_connect("hostname", "username", "password", "db_name"); I get this error 10-01 22:20:27.182: E/JSON(8700): <br />n<b>Warning</b>: mysqli_connect() [<a href='function.mysqli-connect'>function.mysqli-connect</a>]: (42000/1044): Access denied …

Member Avatar for <M/>
0
147
Member Avatar for laura301019

Hi I am starting my final year project and was wanting to know how to connect visual studio to my database. I am using phpmyadmin which is on the uni's server so I can work on it at uni and at home but I am having trouble finding out how …

Member Avatar for laura301019
0
271
Member Avatar for Indians

i created main.php page. this page includes these following php codes, <?php $user = ""; $pass = ""; $db = ""; $connect = mysql_connect("", $user, $pass); if(!$connect) { die ("Could not connect to MySQL"); } mysql_select_db($db, $connect) or die ("Could not open $db: " .mysql_error()); $sql = mysql_query ( "SELECT …

Member Avatar for Indians
0
277
Member Avatar for patk570

Hello, I am trying to update 3 tables that i have in my db. the second and third INSERT commands there is a specific field that needs to have the ID of the first table last row inserted. first table, admin: +--------------------+ |id username passcode| |1 admin test | +--------------------+ …

Member Avatar for patk570
0
186
Member Avatar for Yna Aurielle

i am making a reservation system and i am having a a problem with time conflicts(the system must not accept a reservation where in there is already an event reserved art that time. . my table looks like this ![0fac31edf20c874089f52ed4a0be4fb6](/attachments/small/4/0fac31edf20c874089f52ed4a0be4fb6.png "align-left")

Member Avatar for Reverend Jim
0
380
Member Avatar for Christine121

**Can anybody help me??? I'm newbie in php, I'm trying to make this code as one below.But it always gives me an error. Any help would greatly appreciated ** my table name is trans ![Fields[1] * *$id = $_POST['id']; if(isset($_REQUEST['command']) && $_REQUEST['command'] == 'update'){ $name = $_POST['name']; $email = $_POST['email']; …

Member Avatar for Christine121
0
198
Member Avatar for praba_web

Hi **I have doing the project for my purpose. it is working properly on localhost engine. after i have uploaded to server(cpanel) it is not working. i have posted my code here for reference: Please help me anyone!!!** ** Login.php** `Inline Code Example Here` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 …

Member Avatar for pritaeas
0
218
Member Avatar for saadi06

Hi, I am creating a function in mysql and I want to make the order by and limit section dynamic. What I want to do is to call the function and enter the limit and order by condition dynamic. How can I achieve this. Thanks in advance

Member Avatar for LastMitch
0
216
Member Avatar for saadi06

Hi, I have a table named as appointment. In appointment there are two fields appointment_date and person_id. There can be multiple appointment for same person. What I want to achieve here is that the date difference of both appointments for the same person should be greater or equal to 90 …

Member Avatar for Reverend Jim
0
101
Member Avatar for shhh

hello i just want to ask if how to echo value/details using this API link that have given - http://themesnmotifs.com/api/wp/f6f60a0e7091a627641f01b9d1dd7536ea4b8496/list_wp - for example i want to echo all the companyand wp_cellphone -- . thank you

Member Avatar for logicslab
0
267
Member Avatar for sabarinadh.ch

Here i am uploading data through a form which contains some input fields and one image. But i want to upload multiple images here instead of one image. I am attaching my php code here to upload the data and single image. Can anyone edit this code to add mutliple …

Member Avatar for diafol
0
790
Member Avatar for dannybarh

Hi, i have successfully stored a link to docx and pdf files into mysql db. I'm trying to retrieve it from db and display it similar to pictures. Now when the user click on it, it should open the file and display it. If any one have a code sinppet …

Member Avatar for diafol
0
189
Member Avatar for Benjamin_4

i want to calculate the depreciation of an asset and i want my accumulated value to automatically add the previous monthly depreciation value with the current one any time the user calculates for the monthly depreciation, the accumulated value should pick the results from monthly depreciation and add it to …

Member Avatar for cereal
0
2K
Member Avatar for developer707

Hello, Recently I am trying to make a php file than when it is opened it should backup a database and promt the user to save the .sql file... This is a feaure that has phpmyadmin but I want something very simple, just clicking http://mywebsite.com/backup.php and the file should be …

Member Avatar for broj1
0
202
Member Avatar for dannybarh

I have this code $request = mysql_query("SELECT note_title,image_file FROM notez"); while($row=mysql_fetch_array($request)) { echo $row['image_file'].'<br />'; echo $row['note_title'].'<br />'; } and the path to the folder where i stored the files is userimages_doc when i click on note_title , i want to download the file

Member Avatar for pzuurveen
0
99
Member Avatar for Benjamin_4

I want to populate my jtable with columns from different table in mysql database but it only displays the column names and not the data or information under those columns. i hope this code helps u undertand what i mean. thanks private void Update_table(){ try{ String sql = "select Date_Acquired …

Member Avatar for JamesCherrill
0
209
Member Avatar for Kewne

Hi. I'm confuse on how I will create my temporary table. Need some clarification here. I want to create a temporary table that will hold some column and values. And later on I would alter/update the table to add another column and data with respect to the existing columns. ammm... …

Member Avatar for Reverend Jim
0
290
Member Avatar for dannybarh

Hi all, i have a table in db which contain some pdf and docx files. Am trying to display it in a way, so that when the user click on it, it will load the pdf and/or docx file from db in another/same window. this is what i have done …

Member Avatar for pzuurveen
0
3K
Member Avatar for Benjamin_4

Please how can i insert into two different tables in mysql using java. i tried this and its only for one table. so how can i insert into branches and items table simultaneously in the same code? try{ String sql = "Insert into asset_update (Date_Acquired,Item_Code,Serial_Number,Cost_Of_Acquisition,Estimated_Useful_Life,Depreciation_Start_Date,User,Status,Disposal_Date)values (?,?,?,?,?,?,?,?,?)"; pst=conn.prepareStatement(sql); pst.setString(1, ((JTextField)date_aquired.getDateEditor().getUiComponent()).getText()); String …

Member Avatar for Benjamin_4
0
3K
Member Avatar for lexaeterna

good day! im working on a migration tool for mysql to mssql. is there any references or codes that you guys can share to me to create databases and transfer data from mysql to mssql? ive just got this idea of using dump mysql files since they also have sql …

Member Avatar for Ancient Dragon
0
138
Member Avatar for boney

I need help on building a mysql query. I have 2 tables : list and type. List : id_list, name Type : id_type, id_list, name The id_list column in table Type is a reference for id_list in the table List. My HTML [main.php] : <head> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script type="text/javascript"> function …

Member Avatar for LastMitch
0
249
Member Avatar for Gobble45

Hi there, I have 3 tables to extract data from. My query thus far is: SELECT `ministry`.`pm_name` AS 'Name', DATE_FORMAT(`ministry`.`min_begin`, '%Y') AS 'Election Year', `ministry`.`party` AS 'Party Led', `deputy_name` AS 'Deputy PM', COUNT(DISTINCT `ministry`.`min_begin`) AS 'Times Elected PM', `GG_name` as 'GG Name', `gg_title` as 'GG Title' FROM `ministry` JOIN `deputy_pm` …

Member Avatar for Gobble45
0
288
Member Avatar for dschuett

Hi, I am a complete newbie when it comes to php. I have been searching google for a way to upload multiple pictures to a directory at one time, and at the SAME time store each pictures path into a table in the database. I have found several examples of …

Member Avatar for Gloak
0
2K
Member Avatar for debrah.rutherford

Step 1. Install mysql-essential-5.0 Following Command To install that . start mysql-essential-5.5.12-win32.msi /quiet /norestart Step 2. Set configuration Run Following Command line For That . cd\ cd Program Files cd MySQL cd MySQL Server 5.5 cd bin MySQLInstanceConfig.exe -i -q "-lC:\mysql_install_log.txt" "-nMySQL Server 5.5" "-pC:\Program Files\MySQL\MySQL Server 5.5" -v5.5.12 "-tC:\Program …

Member Avatar for Begginnerdev
0
263
Member Avatar for mmcdonald

Hi all, the following PHP MysSQLi query works in XAMPP but not in WAMP: <?php include('../../inc/config.php'); $mysqli = mysqli_connect($config['host'], $config['user'], $config['pass'], $config['db']); $responseQuery = "SELECT tr.id as trid,tr.topicid,tr.usersid,DATE_FORMAT(tr.date_added,'%b %d, %Y %H:%i') AS format_date_added,tr.date_added,tr.response,tr.status, t.id, t.usersid as creatorid, u.id, u.authuser, u.memtype, u.fn,u.ln,u.avatar FROM topic_response tr LEFT OUTER JOIN topic t ON …

Member Avatar for Atli
0
888
Member Avatar for debrah.rutherford

The End.