Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa PHP manipulating dat retrieved from the DB using php arrays

Have Programming Question? Ask it here!
 
 
 


che
manipulating dat retrieved from the DB using php arrays
0 Answer(s)      2 years and 5 months ago
Posted in : PHP


am querying the DB as follows:

$`result=mysql_query("SELECT name,itemquantity FROM mytable WHERE price='$price'");`

now,i want to create an array to insert the values that are as a result of this query e'g let's say this is the resultant data:

name itemquantity price john 10 100 joel 20 100 brian 10 100

how do I create an array to insert the above data using $name and $quantity as variables;
secondly,(this is a trading platform),so let's say a user wanted to buy 25 items from the data in the array,and so to achieve this the script has to take the 10 items from john and 15 from joel(that adds up to 25) and then set their items to the remaining value i.e john's items=0 and joel's items=5.how do I code this.please assist. i've tried to simplify this the best i can .thanks

Advertisement
View Answers

Related Tutorials/Questions & Answers:
manipulating dat retrieved from the DB using php arrays
manipulating dat retrieved from the DB using php arrays  am querying the DB as follows: $`result=mysql_query("SELECT name,itemquantity FROM mytable... it.(this is a trading platform),so let's say a user wanted to buy 25 items from the data
manipulating dat retrieved from the DB using php arrays
manipulating dat retrieved from the DB using php arrays  am querying the DB as follows: $`result=mysql_query("SELECT name,itemquantity FROM mytable... it.(this is a trading platform),so let's say a user wanted to buy 25 items from the data
Advertisements
manipulating dat retrieved from the DB using php arrays
manipulating dat retrieved from the DB using php arrays  am querying the DB as follows: $`result=mysql_query("SELECT name,itemquantity FROM mytable... it.(this is a trading platform),so let's say a user wanted to buy 25 items from the data
manipulating dat retrieved from the DB using php arrays
manipulating dat retrieved from the DB using php arrays  am querying the DB as follows: $`result=mysql_query("SELECT name,itemquantity FROM mytable... 100 how do I create an array to insert the above data using $name
How to use next and previous button(or href) for database table that is retrieved from MySQL DB using jsp,jstl,javascript
that is retrieved from MySQL DB using jsp,jstl,javascript  when click on the next button/link then it must display next 10 record from database and same for previous to display previous 10records. Database Query like this: Select * from table
How to create d db for upload files using bolb i m followin dat upload file in db tutorial
How to create d db for upload files using bolb i m followin dat upload file in db tutorial  Hi, I have tried dis example, I have made d DB luk lik... the message on my browser til dat point.But whn the int s executes the query
How to create d db for upload files using bolb i m followin dat upload file in db tutorial
How to create d db for upload files using bolb i m followin dat upload file in db tutorial  How to create d db for upload files using bolb i m followin dat upload file in db tutorial   Create a table named 'file
How to use next and previous button(or href) for database table that is retrieved from MySQL DB.
How to use next and previous button(or href) for database table that is retrieved from MySQL DB.  Initially,display 7or10 records on a jsp pageand when click on the NEXT button(or href link) then display next 7 records
retrieving info from DB using struts?
retrieving info from DB using struts?  Hi. I was looking info about retrieving info from a database using struts. I need a .java that I suppose connects to a database and show the info on a jsp. Somebody could help me
How to insert data from a combobox and textbox values into DB using JSP?
How to insert data from a combobox and textbox values into DB using JSP?  hi, How to insert a comb-box and a text box values in to DB using JSP? @DB... and textbox2? into MYSQL DB
Store image from html img tag into mysql db using java
Store image from html img tag into mysql db using java  Hi. How to get the image displayed in the < img > tag of HTML and store it in the mysql database using java? Thanks in advance
create a web application using java dat accepts 10 relevant tweets frm twitter in real time for dat keyword
create a web application using java dat accepts 10 relevant tweets frm twitter in real time for dat keyword   create a web application using java dat accepts 10 relevant tweets frm twitter in real time for dat keyword
how to use String tokenizer on table that is retrieved from database using jsp servlet
how to use String tokenizer on table that is retrieved from database using jsp servlet  Query:Table---- mysql> select pid,medicinename,dose,day,qty from medicinedetails2 where pid=15
How to get data from DB in to Text box by using Jsp & Ajax
How to get data from DB in to Text box by using Jsp & Ajax   I want to get the data from database in to text box in a jsp page by using Ajax. If I... with a and from that i need to select the required value and i should store
in registration page,hw the details wil b stored in db,n retrieved.....
in registration page,hw the details wil b stored in db,n retrieved..... ... will b stored in db....(i knw hw to do it bt i ve some doubts in it),so plz give me... in db(do v need to write select query in d same pgm)? and here is my code tthe
create a web application using java dat accepts 10 relevant tweets frm twitter in real time for dat keyword
create a web application using java dat accepts 10 relevant tweets frm twitter in real time for dat keyword   create a web application using java dat accepts 10 relevant tweets frm twitter in real time for dat keyword  
Swing JTable which is retrieved from MySQL
Swing JTable which is retrieved from MySQL  How To Display both image and data into Swing JTable which is retrieved from MySQL database
combine two arrays in php
combine two arrays in php  combine two arrays in php   $newArray = array_combine($diff, $pages_name['data']); foreach ($newArray as $data) { var_dump($data); exit('zzzzz'); echo $data . '<br>
displaying data retrieved from a database in a jsp page
displaying data retrieved from a database in a jsp page  the page should display username, emailid, telephone in addition to tthe tagline however... sql = "select billid, customerid, billdate, status from customerbills where
Todd oracle DB connection through PHP
Todd oracle DB connection through PHP  Can u please explain how to connect Todd oracle DB using PHP & What are the setups we need to perform? Thanks
How to Retrieve Data from Facebook Using PHP
How to Retrieve Data from Facebook Using PHP  is this link has right content regards that?? http://techpdf.co.cc/blog/how-to-retrieve-data-from-facebook-using-php
How to Retrieve Data from Facebook Using PHP
How to Retrieve Data from Facebook Using PHP  is this link has right content regards that?? http://techpdf.co.cc/blog/how-to-retrieve-data-from-facebook-using-php
how to display data into textboxes which is retrieved from the database
how to display data into textboxes which is retrieved from the database  I would like to know how to display data into textboxes which is retrieved from database in jsf. could you please provide a small example of how to do
how to display data into textboxes which is retrieved from the database
how to display data into textboxes which is retrieved from the database  I would like to know how to display data into textboxes which is retrieved from database in jsf. could you please provide a small example of how to do
how to display data into textboxes which is retrieved from the database
how to display data into textboxes which is retrieved from the database  I would like to know how to display data into textboxes which is retrieved from database in jsf. could you please provide a small example of how to do
how to perform operation on data retrieved from database in jsp?
how to perform operation on data retrieved from database in jsp?  i... entered marks into the database from the jsp page and i can also retrieved data from... on data retrieved from database and the present to the user PLEASE HELP ME TO SOLVE
to upload a table from DB to the same html page
to upload a table from DB to the same html page  how to make this booklist table to be opened in the same html page itself using a third frame
View Photo From Db MySql
View Photo From Db MySql  Good Morning Sir, Please help me, I make a small code but i have a error. I want to make viewer photo from database...(); ResultSet res = stat.executeQuery("select * from kar where nik
same thing i want but from db..
same thing i want but from db..  http://www.roseindia.net/tutorial/javascript/dynamicCombo.html same thing i want but from db
retrieving from db - JSP-Servlet
retrieving from db  hello' I am trying to write my first application...: rst=stmt.executeQuery("select * from books_details"); 27: %> 28...; Hi Retrive value from database Retrive data from
how to compare 2 arrays using java?
how to compare 2 arrays using java?  hi can anyone give me the information regarding comparision of arrays.   Java Compare Arrays
how to store and retrieve images int and from the database using php
how to store and retrieve images int and from the database using php  please anyone can help me in storing the images and retrieve it back from the Mysql database using php
Manipulating attributes
Manipulating attributes       Manipulating attributes You can manipulate two types... attribute Manipulating CSS class attribute You can manipulate
upload csv to mysql db using jsp upload
upload csv to mysql db using jsp upload  Hello all, Please give me the code to uplad .csv from jsp page and insert values into MySQl db. I have a table with 8 cloumns.(MDN--varchar(30),Otafdate date,crt varchar(30),dmdn
how to insert, retrieve data from,to db(code)....
that data will b stored in db(m using sybase). 2.also hw to retrieve the data from db. cn u plz tel me the code in detail.n i thk it shud b written in jdbc...how to insert, retrieve data from,to db(code)....  Hi..... i ve
retrive article from sql databse and show using php
retrive article from sql databse and show using php  hello sir i have sql database which i store articles.i want to show these article on web page using php. my field are image,title,summary,content id. plz provide me
Saving image and text in mysql db using spring?
Saving image and text in mysql db using spring?  Hii, My... the image location in db .And actual image(binary formate) should save into server? Iam using spring.Iam not getting how to do this.Plz help me
how to insert, retrieve data from,to db(code)....
will b stored in db(m using sybase). 2.also hw to retrieve the data from db. cn u...how to insert, retrieve data from,to db(code)....  Hi, i have created... for username, password using javascript,hw to write that,n in wch pgm i ve to write(i
Java using arrays - Java Beginners
Java using arrays  Write a program to input a possibly integer n(n<=10);followed by n real values into an array a of size n and the program must perform the following: Display back the values input Sort the values
How to Append Arrays in PHP
How to append array or merge two arrays in PHP: This PHP tutorial is discussed about different techniques to merge two or more than two arrays e.g. array_merge(), + operator etc. This free php tutorial has small description of print_r
Storing Data (Retrieved from a XML Document) to a File
Storing Data (Retrieved from a XML Document) to a File... to store data (retrieved from the XML document) to a specified file (with ... retrieved from the xml document.  An object of Document is passed
Reading from remote files using PHP,Ubuntu and Windows machine.
Reading from remote files using PHP,Ubuntu and Windows machine.  Hi.... I have a php question. Am working on a script that is suppose to read from... on a windows machine within the same network. After reading from it, the script
Read data from Excel and insert in to DB and export data from DB to Excel
Read data from Excel and insert in to DB and export data from DB to Excel  Read data from Excel and insert in to DB and export data from DB to Excel Hi, I need to read the data from excel and I need to insert the same in to DB
retrieve value from db in text box + calendar implementation.
retrieve value from db in text box + calendar implementation.  I have used http://www.roseindia.net/javascript/javascript-calendar.shtml code... there is already a text box..Now i want to get the value retrieved from database
help me in inserting data into db using hibernate
help me in inserting data into db using hibernate  How to insert data into dependent tables through hybernate   Hi Friend, Please visit the following link: http://www.roseindia.net/hibernate/insert-data-database.shtml
arrays
arrays  using arrays in methods   Java use arrays in methods import java.util.*; class ArrayExample{ public static int getMaxValue(int[] arr){ int maxValue = arr[0]; for(int i=1;i < arr.length;i
open pdf file in same jsp page and the pdf file should retrieved from database
open pdf file in same jsp page and the pdf file should retrieved from database  Hai all, I need code to open a pdf file in same jsp page(browser) while click on hyperlink And the file was located in database table. Can any
Arrays
Arrays   Hi I need help with the following exercises. Exercise 1: Write a Java application in which the user is prompted for the total number... initialize an array with 10 String values. Randomly select a value from the array
code for jsp to db connection using jdbc
code for jsp to db connection using jdbc  please send me the code   Hi Friend, Try the following code: 1)form.html: <html> <form method="post" action="http://localhost:8080/examples/jsp/insert.jsp"> <
How To Display both image and data into Swing JTable which is retrieved from ms access database
How To Display both image and data into Swing JTable which is retrieved from ms access database  So far this is my code how can i display both image and data from database.. while (rs.next()) { Vector row = new Vector(columns
Advertisements
 

 

 

DMCA.com