10,940 Topics
| |
**I want to add multiple Record. Add 1 record if it is to insert 1 record , but if 5 recoed data will insert 5 record. Sorry i'm not good english** images 1 [Click Here](http://i.stack.imgur.com/K4XdO.png) images 2 [Click Here](http://i.stack.imgur.com/K4XdO.png) <?php include_once("connect.inc.php"); if (isset($_POST['submit'])) { $i = 0; foreach ($_POST as … | |
Hi guys I need a help here, I’m trying to use Ajax to update the column of the table in the database with combobox without a submit button, by the way it update the column finely but unfortunately the column data is erased to **0** when a webpage is refreshed. … | |
Consider the following query: //$fix and $limit are dynamic values $query="SELECT ICAO_Ident AS ID, Location_Identifier AS LocID, Official_Facility_Name AS Name, Landing_Facility_Type AS AptType, Associated_State_Post_Office_Code AS State, Associated_City_Name AS City FROM APT WHERE `Location_Identifier` LIKE '%$fix%' OR `ICAO_Ident` LIKE '%$fix%' OR `Official_Facility_Name` LIKE '%$fix%' OR `Associated_City_Name` LIKE '%$fix%' ORDER BY `ICAO_Ident` … | |
| I used below select query to select information from two tables. But it show one record. How to change this code to view all records ? select loan.loan_id, loan.customer_name, loan.total_amount, ifnull(sum(settlement.amount), 0) as 'Total Received', ((loan.total_amount) - ifnull(sum(settlement.amount), 0)) as 'Total Due' from loan left join settlement on settlement.loan_id = … |
I was working on bank ifsc code search engine which provides all branch details for every bank in India. I used Php and Mysql to handle database queries and data retrieval. The whole project looks good but there were some technical limitations stopping me. Like, i have done all SEO … | |
Hi, I'm kinda new to php and mysql. I'm making a basic shopping cart using 2 database tables. I want my cart to display items from the 2 tables into 1 html table. I ran into a problem giving the 2 database tables the same id name, so now I … | |
Hi guys, I'm busy testing storing PHP variables in a MySQL table but I'm having difficulties using them as variables when pulling them from MySQL. When I pull the variables is displayed as a normal string and I'm not able to use them as a variable. Is it possible to … | |
Hi all, i'm currently workin on a project and i need to show on a maps the live position of my car. i have an arduino wich send every 5sec to my DB the position The problem is that i can't figure out how to refresh my polylines every 5second … | |
What type or version of mysql do you need to run to have referential inegrety, withhout having to reley on using triggers? | |
Hey everyone, I am trying to be able to have a textbox that only accepts numbers that is either 1 or greater but less than the number of items in a table from the databse. The queries work fine and such. What I'm trying to figure out is how to … | |
SELECT [SNAP!] FROM topics INNER JOIN members ON topics.author = members.id WHERE topics.parent = [variable from PHP] ORDER BY topics.id DESC LIMIT [variable from PHP], 10 Is what I have in pocket. I'd like to slam `SELECT * FROM forums WHERE id = topics.parent`. While keeping the functionality it already … | |
This question is very similira to this [one](https://www.daniweb.com/programming/web-development/threads/472324/inserting-a-multidimensional-array-into-db) but with a little twist to it. I have an array that looks like this: Array ( [0] => Array ( [post_id] => 5410 [Issue] => 2010 [_Issue] => field_573d7fa8454e9 [_volume] => field_573d7f79ef9ab [volume] => 530 [_journals] => field_56d3de5ddc04d [pages] => 105-9 … | |
This question is similar to this [one](https://www.daniweb.com/programming/web-development/threads/371092/notice-undefined-index-id-on-line-26) However, my insert does not involve a form but a direct mysql query that looks like this $query2 = "insert into table(author,title,abstract) values(:author,:title,:abstract) "; $stm=$con->prepare($query2); $stm->bindValue(':author', $author, PDO::PARAM_STR); $stm->bindValue(':title', $title, PDO::PARAM_STR); $stm->bindValue(':abstract', $abstract, PDO::PARAM_STR); $stm->execute(); echo "$author   $title   $abstract <br>" In … | |
I want to insert multiple records to wp_posts table in word press using a mysql query and not the front-end. I also want these new records(that i insert into wp_posts) to insert metadata into wp_postmeta table. My question is how can i do this? How does wp_posts update wp_postmeta if … | |
SELECT blabla FROM a INNER JOIN b ON a.a = b.b Is what I have. However I'd like to sort the results DESC by ID. I'd like to select last [`variable` x 10] of items sorted by ID DESC. Variable provided by PHP (I'll sort things out, I just need … | |
If you were to suggest an outsourced IT provider, which company would that be and why? | |
Hi, I need help with the attendance form (index.php). When I tried to update the first row, nothing happened. For the last row, the message says, "**We couldn't update the attendance form at this time.**" Please check lines 96 and 101 to see if got any error. And also I … | |
Hi, i have was make small social network website and now i need to use RESTful API for hybrid application. Social network website i make in php, mysql. How to make API now? Do you have some tutorial for API that integrate in existing website? Thanks! | |
Hey everyone, I have a question about prepared statements for PHP and mySQL. I have been able to do them for a single row such as ID and such for a particular object, but is it possible to do a SELECT all command as well? I want to be able … | |
I have a member table from which I'm trying to create a query using these fields mem_id / username / create_date / mem_status / ref_id / qualify_id A new member is mem_status 'F' with ref_id equal to the mem_id of their referrer and qualify_id of zero When the member upgrades, … | |
Hey everyone, I have created a PHP web application that allows people of different permissions to do certain things such as read-only, add, update, or delete. That works pefectly. However, it came across my mind that I have not done anything to prevent against SQL injection or XSS attacks. I … | |
Hello guys. I am currently developing a Case Management System with a versioning function. The versioning function will allow top management to see the different versions of a document and the different changes that were made by either the lawyer or top management. My problem is, how would I start … | |
Hi, In an excel file, I have 10 headings and that file contains more than 6000 records. I upload file using oleread.inc and excelreader file. It takes time to upload recods in table minimum 4 - 6 minutes. How to decrease the time and insert records in table fastly. | |
I have this code session_start(); $username = $_SESSION['username']; function getUserRole($username, $roleid){ $con=dbConnect(); $query="select * from user inner join userrole on user.id = userrole.userid inner join role on role.id = userrole.roleid where username = $username"; $sql=$con->prepare($query); $sql->bindValue(':username',$username); $sql->bindValue(':roleid',$roleid); $sql->execute(); $row = $sql->fetch(); $username = $row['username']; $roleid = $row['roleid']; if($row > 0){ … | |
Hey everyone, I have a question about a database design that I have right now. The template I was given from someone is the first attached that you will see. I looked at it and figured that the database design of that is not the best, so I decided to … | |
Hi, I have a page for sending SMS by selecting anyone organization, By selecting organization, it will calculate how many customers are there to send SMS, It will display the SMS Count along with all managers names using JQUERY AJAX. For counting this value,it takes so much time in online, … | |
Hi guys I was hoping you could help I would like to add 10000 records in mysql db.All once with after running a single php script. in one of the fields should generate 10000 rand generated numbers. Any suggests would really help. I was thinking of a for loop. [CODE] … | |
Hey everyone, I have a question. I have a web app where you have a table that will either update, delete, or add a user. The update works great but the delete is weird. It deletes just fine, but I ask for a confirmation first before the action is completed. … | |
Hi Dw. I'm deeply in need of your help, I'm having a problem that is giving me a very serious problem with my code. My program is a multithreaded program and its a TCP/IP based application. Client has no problem, only a server that is being so weid to me … | |
I know this is very basic but i am not able to get the fuction return a string. Instead it is returning the value 1. Below is the code: <?php function getUserRole($username, $roleid){ include "data.php"; $con=dbConnect(); $query="select * from user inner join userrole on user.id = userrole.userid inner join role … |
The End.