kansasskydiver 0 #1 March 23, 2005 Alright I'm new to it and trying to figure something out here. I understand the basis of sql and the database as far as keeping the information, creating tables and being able to search. Serves my purpose for what I'm trying to do. I have a server set up with Apache, php and mysql installed. What I need to know is, is php able to add to the database and most importantly, output a number of how many rows are filled or subtract from a set number and then echo back the number of available spaces? Basically a basic ordering system (but a bit more complex) Where I have X available, information is imputed to the table but the next page view will view it as one less in the inventory. Am I going the right direction or not? Please help<--- See look, pink dolphins DO exist! Quote Share this post Link to post Share on other sites
GTAVercetti 0 #2 March 23, 2005 Quote Alright I'm new to it and trying to figure something out here. I understand the basis of sql and the database as far as keeping the information, creating tables and being able to search. Serves my purpose for what I'm trying to do. I have a server set up with Apache, php and mysql installed. What I need to know is, is php able to add to the database and most importantly, output a number of how many rows are filled or subtract from a set number and then echo back the number of available spaces? Basically a basic ordering system (but a bit more complex) Where I have X available, information is imputed to the table but the next page view will view it as one less in the inventory. Am I going the right direction or not? Please help I am not sure I understand exactly what you want. You want to put something in the DB and have the next page show one less? I don't get it. If it can be done in Mysql, you can do it in php. Use http://www.php.net as a MUST HAVE resource. Search the function list for 'mysql' and see all the stuff that comes back. PHP is what I work in. In addition, for your purposes, there is no SET number of available rows in a mySQL DB. Drop me a pm if you like.Why yes, my license number is a palindrome. Thank you for noticing. Quote Share this post Link to post Share on other sites
davedlg 0 #3 March 23, 2005 I dont really understand what you want to do either, but you might look at the "COUNT" function in MySQL...it can count the number of records that match certain criteria. That would work if you are establishing a record for each individual item in inventory. If you have a record for every type of item, but not every individual item, you could just establish a field that is the number available in inventory and subtract the number sold every time a sale is completed. That wouldnt be too difficult to program in PHP. Quote Share this post Link to post Share on other sites
Buried 0 #4 March 23, 2005 Quote What I need to know is, is php able to add to the database and most importantly, output a number of how many rows are filled or subtract from a set number and then echo back the number of available spaces? most anything is possible. you just need to write the correct php code and SQL queries Where is my fizzy-lifting drink? Quote Share this post Link to post Share on other sites
Guest #5 March 23, 2005 LAMP, the alternative to M$FT... mh ."The mouse does not know life until it is in the mouth of the cat." Quote Share this post Link to post Share on other sites
GTAVercetti 0 #6 March 23, 2005 Quote LAMP, the alternative to M$FT... mh . Absolutely. Used by some estimate, 50% of the internet. Give or take.Why yes, my license number is a palindrome. Thank you for noticing. Quote Share this post Link to post Share on other sites
pilotdave 0 #7 March 23, 2005 Yes, php/apache/mysql can do everything you want. You'll be reading from the database (the inventory), using php to subtract one from the inventory, then writing the new inventory back to the database. Other than the upload function (which uses some perl), SkydivingMovies.com works completely through PHP talking to MySQL (and a few cool videos thrown in there too). Dave Quote Share this post Link to post Share on other sites
kansasskydiver 0 #8 March 23, 2005 Ok now you'd figure that with my computer skills I could at least get php installed on my freaking server hahah help<--- See look, pink dolphins DO exist! Quote Share this post Link to post Share on other sites
Buried 0 #9 March 23, 2005 lol. did you add the items in the config file and restart apache? Where is my fizzy-lifting drink? Quote Share this post Link to post Share on other sites