7,368 Topics

Member Avatar for
Member Avatar for fheppell

This php code updates a database entry. The form consists of a checkbox (name = download) and a hidden field so I can check it has actually been sumbitted(name = updated). When I run this code it gives me the success message but the database remains unchanged. Why is this? …

Member Avatar for fheppell
0
161
Member Avatar for fheppell

I've got a mysql query that should return a single cell SELECT `download` FROM `images` WHERE `owner_un`='$owner' AND `url`='$url' How would I echo the result of this? Thanks for any help

Member Avatar for minitauros
0
233
Member Avatar for FaisalSarfraz

Hi all I am new to java programming. I need a litte helop. I want to take some results from database so i am trying to connect to database. I have dowloaded jdbcmysql connector but having no idea how to add it in eclipse or jre. Plus i am having …

Member Avatar for jwenting
0
340
Member Avatar for kakalahori

i have stored some value into DB table and want to get them displayed on my form with a restriction that the column title in DB and the Value of the previous feild are same and only the cloumn rows are shown inthe following feild in the form....!!!! Cant Figure …

Member Avatar for diafol
0
141
Member Avatar for kakalahori

hi can any one share some possible way to print an invoice when some thing is registered in a form using PHP and redirects it to html page for printing my form is ok and stores data.... redirects to the disered page as well now i have html lay out …

Member Avatar for diafol
0
1K
Member Avatar for Tinnin

Hi all, I'm trying to run a stored procedure: BEGIN SELECT YFR_Master_Fundraisers.FRName, YFR_Master_Fundraisers.FRActive FROM YFR_Master INNER JOIN YFR_Master_Fundraisers ON YFR_Master.FundRaiser = YFR_Master_Fundraisers.FRNameCode GROUP BY YFR_Master.FundRaiser HAVING MAX(YFR_Master.CollectionDate) < DATE_SUB(CURDATE(),INTERVAL 2 MONTH) AND YFR_Master_Fundraisers.FRActive = 1; END But I'm getting the following error: Procedure execution failed 1312 - PROCEDURE db355379982.Deactivate can't …

Member Avatar for Tinnin
0
178
Member Avatar for OsaMasw

Hi buddies how are you, now am using replication for mysql database from one server to other Master-slave replication, using this article https://www.digitalocean.com/community/articles/how-to-set-up-master-slave-replication-in-mysql but this not satisfied my needs, I have multiple server and all their databased replication to single slave server to be more accurate, I have servers **A**, …

Member Avatar for cereal
0
189
Member Avatar for sathishnaidu

I have the following mySQL query, and for some reason I can't get it working. I have two tables: exp_competition_purchase_upload_total contains a member id and total_uploads column. exp_channel_titles has lots of columns, but the two I need to check is author id and channel id. My aim is to query …

Member Avatar for Szabi Zsoldos
0
217
Member Avatar for mogaka

CASE WHEN ((SELECT COUNT(id) FROM users) > 0) THEN BEGIN INSERT INTO users(username,password) VALUES('Moshe','Ahuva'); END ELSE BEGIN INSERT INTO users(username,password) VALUES('Zvi','Idan'); END END My aim is to save with a condition. but it fails and says: "Check the manual that correponds to the right syntax near ELSE BEGIN ....". please …

Member Avatar for pritaeas
0
87
Member Avatar for riahc3

I currently have $tableName="thenameofthetable"; $someid=$_GET["someidthruget"]; $result = mysql_query("SELECT name,age FROM ". $tableName. " WHERE idp=". $someid); Which looks really insecure. How can I do it using a stored procedure which I think will make it a lot more secure? Thanks

Member Avatar for riahc3
0
636
Member Avatar for xianamersu

How to I check for existing username without using mysql in php? I tried something like this but it isnt working. Please help. Thanks. Strictly no SQL... $name=$nme; $name = file("datatext/users.txt"); $ic=file("datatext/users.txt"); if (this.$nme== $name) { echo "this user exits, please log in"; }

Member Avatar for diafol
0
342
Member Avatar for amkaos

Hi: i search as to why my database wont send out emails and find this forum. i find the exact code im using in this forum.. it originally is for xaamp. i need to have it work from my server: http://www.daniweb.com/web-development/php/threads/412468/how-to-send-mail-to-email-address-on-mysql-database. i posted on https://gist.github.com/amkaos/5608094 but i can post code …

Member Avatar for amkaos
0
387
Member Avatar for calibi.yau

Hi all I'm really hoping someone here can help me out with this one... I'm trying to search through a table via php but having difficulty with case - The problem is the data I'm searching through is encrypted (aes_encrypt) and it doesn't seem to matter what I do the …

Member Avatar for udaypatelmca
0
1K
Member Avatar for SoulofchaOs

There's a error when I run this jsp file --> **" pstmt.executeUpdate();".** **"org.apache.jasper.JasperException: An exception occurred processing JSP page /TestAdd.jsp at line 39"** My code essentially have a text box for users to enter a value, and then the value is sent to the MySQL database. Any help is appreciated …

Member Avatar for peter_budo
0
300
Member Avatar for andika.kurniawan.121

There are two tables "LESSON" TABLE Attributes : - id_lesson -lesson_name - semester "LECTURES" TABLE Attributes : - id_lectures - id_lesson - id_lecturer - hour - day How to display all atributes in lectures table where lessons in 2nd semester ? Note : there's id_lesson in lectures table

Member Avatar for TonyG_cyprus
0
141
Member Avatar for kakalahori

ok here is the login function from my class user which parent class is a Db connection file <?php require_once("DBConnection.php"); class User extends DBConnection { .... .... ... ... public function Login() { $sqlSelect = "select `UserName` from `user` where `UserName` = '$this->userName' and `Password` = '$this->password'"; $result = @mysql_query($sqlSelect, …

Member Avatar for diafol
0
211
Member Avatar for RoryGren

Hi All I'm sure I'm missing something very small - and embarrassing! I'm being lazy - I could have entered the data manually, but wanted to automate it. I have a small csv file containing swimming meets, dates and locations along the following lines: May-13;;;; 17;other;Level 1 Program 1;Arboretum; 24;other;All …

Member Avatar for RoryGren
0
243
Member Avatar for geneh23

Hey everyone, So I did some more searching and I found a link that sort of helped me figure this thing out in a sense.. Here's the link https://developers.google.com/maps/articles/phpsqlajax_v3 . When I do all of what the site told me to do, it did give me a map but it …

Member Avatar for geneh23
0
367
Member Avatar for Victoryy

I am using MySql 5.1. I want to create a dump file through command prompt. I am using the MySQL Command Line Client. I have searched on web and got a command as. `mysql -u username -p password -h host database_name > dumpfile.sql` While executing it in my client command …

Member Avatar for cereal
0
236
Member Avatar for Tinnin

Hi all, I have the following query: SELECT A.Name, MAX(B.VisitDate) AS 'Last Visit Date', A.Active FROM B INNER JOIN A ON B.NameCodeB = A.NameCodeA GROUP BY B.NameCodeB HAVING MAX(B.VisitDate) < DATE_SUB(CURDATE(),INTERVAL 2 MONTH) AND A.Active = 1 This selects a list of all people in the database who last visited …

Member Avatar for Tinnin
0
196
Member Avatar for sathishnadu

Can anyone explain me on details the difference of Deadlock and Lockwait errors found on MySQL 5.1. Is it just the same? When did the deadlock error occur and when did the lockwait timeout occur?

Member Avatar for pritaeas
0
60
Member Avatar for RigaConnectCom

This is working code $sql = "REPLACE INTO 2_1_journal (Number,RecordDay, RecordMonth) VALUES "; $insertQuery = array(); $insertData = array(); foreach ($_POST['row_id'] as $i => $row_id) { $insertQuery[] = '(?, ?, ?)'; $insertData[] = $row_id; $insertData[] = $_POST['date_day'][$i]; $insertData[] = $_POST['date_month'][$i]; } if (!empty($insertQuery)) { $sql .= implode(', ', $insertQuery); $stmt …

Member Avatar for RigaConnectCom
0
1K
Member Avatar for mogaka

SELECT code_type,code,encounter,pid,provider_id,date,CONCAT('code_tye',':','code') INTO @code_type,@code,@encounter,@pid,@povider_id,@date,@standard_code FROM billing FOR EACH ROW BEGIN SELECT procedure_type_id INTO @type_id FROM procedure_type WHERE standard_code='@standard_code' FOR EACH ROW BEGIN INSERT INTO procedure_order(procedure_type_id,date_ordered,provider_id,date_collected,order_priority,order_status ,patient_instructions,patient_id,encounter_id) VALUES('@type_id','@date','@provider_id','@date','high','pending','complaints','@pid','@encounter') END END #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for …

Member Avatar for pritaeas
0
211
Member Avatar for baruchM

I have tested out my procedure on my home machine. It woks pretty well I know there is output from the sql. Now I want to try it out on the host. It gives no output. Here is my php code $bob="call seeker($profound)"; if (mysqli_multi_query($conn,$bob)) { echo "<hr>"; echo "<table><th>Section</th><th>Author</th><th>Title</th>"; …

Member Avatar for pritaeas
0
271
Member Avatar for Ronnie.Sk1ttl3s.Eke

I am getting this error when inserting a query into the SQL tab of a database, it only adds 2 tables when it is supposed to add more, but the error is stopping it? Screenshot: http://gyazo.com/b62b31137708228beb791ed6c8ad01ea Query im inserting: http://pastebin.com/rMJeA0Xb Software: MySQL Software version: 5.1.68-cll - MySQL Community Server (GPL) …

Member Avatar for JOSheaIV
0
248
Member Avatar for grant.baker

I'm trying to sum all numeric fields individually. I won't always know the field names, otherwise I could manually construct the query `SELECT SUM(Field1) as Field1, SUM(Field2) as Field2...etc FROM myTable` Is there a way to construct this on the fly in mysql? I'm thinking there's probably a way to …

Member Avatar for grant.baker
0
243
Member Avatar for mohnish34

Hello all, i am developing a friend request type feature ion my site using php. So can ypu please advice me on how the database design should be there? Thank you

Member Avatar for pritaeas
0
64
Member Avatar for adeeb.keyaam

<?php $dbHost = "localhost"; $dbUser = "root"; $dbPass = ""; $dbName = "test"; $conn = mysql_connect($dbHost, $dbUser, $dbPass); if(!$conn){ die(mysql_error()); } mysql_select_db($dbName, $conn) or die(mysql_error()); if(isset($_POST['submit'])){ $field = $_POST['field']; } if(isset($_POST['submit2'])){ $field2 = $_POST['field2']; } if(isset($_POST['submit3'])){ $field3 = $_POST['field3']; } ?> <?php if(!isset($_POST['submit']) || isset($_POST['submit']) != "true"){ ?> <form id="create" …

Member Avatar for adeeb.keyaam
0
213
Member Avatar for sathishnadu

Should store procedure cached in Mysql? If yes, How long it is stay in cache? In my case, When I call one store procedure first time, It is giving me result in 1sec, after that it gives me result in 400ms. and when I am changing some parameters passed to …

Member Avatar for cereal
0
174
Member Avatar for sathishnadu

I have a query: SELECT b.user_id, b.active FROM users b WHERE b.followers_count != (SELECT COUNT(*) FROM (SELECT u.user_id FROM user_follow uf,users u,user_follow_request ufr WHERE uf.following_id = b.user_id AND uf.following_id = ufr.friend_id AND ufr.status = 'approved' AND ufr.user_id = u.user_id AND u.user_id != b.user_id AND u.active != 0 GROUP BY u.user_id) …

Member Avatar for cereal
0
134

The End.