10,940 Topics

Member Avatar for
Member Avatar for Goddy_1

**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 …

Member Avatar for diafol
0
440
Member Avatar for Hamis_3

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. …

Member Avatar for grant.baker
0
303
Member Avatar for grant.baker

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` …

Member Avatar for grant.baker
0
275
Member Avatar for සශික

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 = …

Member Avatar for Bukola_1
0
268
Member Avatar for ajahar

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 …

Member Avatar for rproffitt
0
1K
Member Avatar for cork

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 …

Member Avatar for Rennie_1
1
10K
Member Avatar for LRNPHP

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 …

Member Avatar for pzuurveen
0
111
Member Avatar for riccardo_1

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 …

Member Avatar for rproffitt
0
1K
Member Avatar for _1_1

What type or version of mysql do you need to run to have referential inegrety, withhout having to reley on using triggers?

Member Avatar for rproffitt
0
74
Member Avatar for TheFearful

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 …

0
192
Member Avatar for Aeonix

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 …

Member Avatar for Aeonix
0
236
Member Avatar for Amaina

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 …

Member Avatar for Amaina
0
442
Member Avatar for Amaina

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 &nbsp $title &nbsp $abstract <br>" In …

Member Avatar for Amaina
0
280
Member Avatar for Amaina

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 …

Member Avatar for Amaina
0
755
Member Avatar for Aeonix

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 …

Member Avatar for hielo
0
312
Member Avatar for reamay
Member Avatar for Abhilash_1
1
245
Member Avatar for SpottyBlue

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 …

Member Avatar for hielo
0
1K
Member Avatar for gogs85

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!

Member Avatar for divyakrishnan
0
137
Member Avatar for TheFearful

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 …

0
215
Member Avatar for showman13

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, …

Member Avatar for showman13
0
330
Member Avatar for TheFearful

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 …

Member Avatar for TheFearful
0
385
Member Avatar for laguardian

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 …

Member Avatar for rubberman
0
168
Member Avatar for AntonyRayan

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.

Member Avatar for urtrivedi
0
186
Member Avatar for Amaina

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){ …

Member Avatar for diafol
0
2K
Member Avatar for TheFearful

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 …

Member Avatar for TheFearful
0
338
Member Avatar for AntonyRayan

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, …

Member Avatar for jacks009
0
198
Member Avatar for tapuwa2002

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] …

Member Avatar for cereal
0
3K
Member Avatar for TheFearful

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. …

Member Avatar for TheFearful
0
384
Member Avatar for Mr.M

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 …

Member Avatar for Mr.M
0
498
Member Avatar for Amaina

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 …

Member Avatar for elisajames
0
285

The End.