Jump to content

freebs

Members
  • Content Count

    16
  • Joined

  • Last visited

Everything posted by freebs

  1. Hey Barand.. sorry to bug you again.. but how would I get the horizontal lines back in the table? I had them in a style.css.. but this <?=$tdata?> can't seem to be manipulated.
  2. let me check.. .. it does now after I restarted httpd.. thanks.. that help me out alot.. lol
  3. php ini says they are on.. but I guess not to screen.. as I don't get them.. screen just goes blank when i have an error. How would I turn that on?
  4. now it worked.. thank you.. not sure why i didn't get an error
  5. error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT in php.ini PHP 5.5.38 (cli) (built: Jul 21 2016 12:25:20) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
  6. lol.. that's a good one... it's likely either mysql version or php version then maybe..
  7. that's what I thought.. this is bizarre .. HTML work as in it displays things.. I then name it test.php and nothing.. blank screen no errors. I even tried to echo something out. I'm using bluefish as an editor if that makes a difference..
  8. Thanks Barand.!! the file works kind of.. I had to change the name to HTML, but the top portion is like a var_dump of the SELECT statement.. weird.. The search function yields no results..... shouldn't the file end in .php ?
  9. no matter what I do I cannot get that code to return anything..I can't even seem to var_vump the db connection.. Am I missing something here.. likely something silly I'm missing.
  10. Hmm I can't get this to work at all.. does $db = pdoConnect(); require a class connection php page ? I haven't got that.. just a config.php with host; username..password... and so on with error checking with PDO:: ATTR_ERRMODE and exception.
  11. Wow, thanks very much! that is quite different from what I have. However, I do need the submit since there is a form on the bottom which is my search function. I'll try an incorporate this into it. When you first come from the main php page to this find customer.. it's a simple search submit function button. once criteria are entered and valid it returns the rows else is says can't find the customer. I do see that you are consecutively adding the values together to get total_value.. I didn't even think of that. I was trying to get the values from the SUM array. Is it possible to use the search function on the page with what you've given me? I'll try and see what happens! Thanks so much for your time and effort on this.... I can send you money for a couple beers!
  12. yes sorry, I'm not always clear on my descriptions but I try. here is a link to the page I'm trying to figure out. Current code page Of course, I have a couple of things out with // as I'm trying different things. Just trying to get the SUM for Value and Balance on the RESULTS page of the search. Also, others have said I need a sub-query to get what I want.. there is likely a few ways to do this, but I have tried without success.. this is the closest I've gotten so far is the Array with the data required.
  13. Thanks for your answer , If I'm understanding you correctly, you're assuming I added this array manually? The Aarray I have is a variable got by $totalv = $stmt->fetchAll(\PDO::FETCH_GROUP|\PDO::FETCH_ASSOC); This was a simple CRUD and I need to do calculations on it now.. so when a person uses the SEARCH for Company, the result returned needs to be summed for the value and the balance columns. Also the format in mysql for the actual data is simply 123456.00 I used a function to format that data, I thought this was the correct way to do this. From what I have read and told by a couple others is that I need a derived table and a join to the data into a table. +---------------------+-------------+ | customer | total_value | +---------------------+-------------+ | Aecon | 4991732.24 | | All Weld | 341518.00 | | ANJ | 0.00 | | Casadei Steel | 205000.00 | | CIMS | 3690.00 | | Covia | 9048899.00 | | Curran Contractors | 1022036.00 | | Great Lakes Fab | 62131.00 | | Shell Canada | 196780.00 | | St Clair Mechanical | 4800.00 | | Suncor Ethanol | 15080.00 | | Wolverine | 4875.00 | +---------------------+-------------+ that's the sum group by customer from CLI. Would it be best to create a derived table and join? This is where I'm a little lost...
  14. Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/5.5.38 Database client version: libmysql - 5.6.43 PHP extension: mysqli PHP version: 5.5.38 Server: Localhost via UNIX socket Server type: MySQL Server version: 5.6.43 - MySQL Community Server (GPL) Protocol version: 10 Current code I used Pastebin to post the current PHP page I'm trying to figure out. I' need to get the values of the array total_value and total_balance to the HTML table. Link to Array results - well one array. var_dump of total_value array. I'm not sure if it's a MySQL and a join with a derived table or what is best and how to accomplish this. Don't hammer on me to bad this is really my first time trying this. I'm going through PHP and MySQL course right now, but haven't really touched on this sort of thing yet.. mostly simple things. Here is a link to the HTML table after a search for a customer/company was made. I search a company to get these results but now I'd like to total the value and balance on the bottom. HTML table results Any help or pointers is appreciated!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.