Jump to content


  • Posts

  • Joined

  • Last visited

xfire123's Achievements

Regular Member

Regular Member (3/5)



  1. Can i pass this two variables to the php script and start him without need to redirect me to page? I need just to generate the json
  2. Hello! I have a problem. Can you help me please. A user is entering two dates in to a form. When he press submit the date pass in another opened page and doing stuff. Can i pass this variables to one more php file. He create a json file. I need to create this json right after user hit submit and then redirect to the page. Im using this to redirect and pass the two dates header("location:gentable_chart.php?" . $_SERVER['QUERY_STRING']); exit(); I need to pass the variables one more time to create the json before the redirect. Any idea how to do this?
  3. Hello! Can you tell me how to create chart(like Excel chart) from for example PostgreSQL tables in Website. I`m searching in google but im not finding any freeware method... Can you help me?
  4. Great, thank you. And still can i echo cavch number from corresponding to the MAX amount in your example?
  5. Nice example thanks. I deal with similar DB structure in another topic in the forum. But in this two cases i'm not the designer of this DBs. But i got the idea. Someone told me to create a view that returns a normalized result. At this time i don't have any experience for that. In my example i get the last records of all columns for the 'max'. I don't see what query will do that for this example. And how to display the name(number) of column fom the max cavch in your example?
  6. Hello!!! Any idea how to accomplish this: I want to echo the column name and the value of max($obj->CAVCH1,$obj->CAVCH2,$obj->CAVCH3) Here is the other part of the code $serverName = "IP"; //serverName\instanceName $connectionInfo = array( "Database"=>"DBname", "UID"=>"username", "PWD"=>"password"); $conn = sqlsrv_connect( $serverName, $connectionInfo); $result = sqlsrv_query($conn,"SELECT TOP (1) Events.EventDate, AVDCAV.CAVCH1, AVDCAV.CAVCH2, AVDCAV.CAVCH3 FROM AVDCAV INNER JOIN Events ON AVDCAV.IDEvent=Events.EventID WHERE CAVCH1 > 0 or CAVCH2 > 0 or CAVCH3 > 0 ORDER BY AVDCAV.IDEvent DESC"); $obj = sqlsrv_fetch_object( $result ); $maxObj = max($obj->CAVCH1,$obj->CAVCH2,$obj->CAVCH3); Now i can only to echo the biggest value from the this 3 columns. The numbers are like 0.123 etc.
  7. Is there any way to link one "if" statement if is true or false. And then use this condition to another "if"? Like this: ifn(...){...} = true $if1= if1(...){...} ... $if(n)=ifn(...){...} then if ($if1 || $if(n)) { do something} I hope you understand ok btw i write "I hope you understand" when you write it the Matrix is strong
  8. Can you give me an example what will be the the code after normalization of the DB. What will be the for loop after this? This is part of the table with some values. Lets say this is the complete table. How to normalize and make a php loop like my example in the beginning in more simple way like you said?
  9. Im reading tutorials atm. Thanks. I will ask again when i'm ready.
  10. Btw i auto import the data in table from csv files in particular time. Just mention.
  11. Now can you give me more detail explanation via code example. I don't understand very clear. Maybe you will post a link to tutorial or something?
  12. Yes its not my primary language. Ok. Here is the table: -- Table: public.otv_fil -- DROP TABLE public.otv_fil; CREATE TABLE public.otv_fil ( "timestamp" timestamp without time zone, blok9osx double precision, timestamp2 timestamp without time zone, con integer, blok9osy double precision, timestamp3 timestamp without time zone, con2 integer, blok11osx double precision, timestamp4 timestamp without time zone, con3 integer, blok11osy double precision, timestamp5 timestamp without time zone, con4 integer, filblok10 double precision, timestamp6 timestamp without time zone, con5 integer, filblok11 double precision, timestamp7 timestamp without time zone, con6 integer ) WITH ( OIDS = FALSE ) TABLESPACE pg_default; ALTER TABLE public.otv_fil OWNER to postgres; Is this the structure that i must to show?
  13. Yes in here for($ri = 0; $ri < $numrows; $ri++) { $row2 = pg_fetch_array($result, $ri); if ($row["blok9osx"] > 1.2){ $warning = "<span class='warning'>{$row['blok9osx']} l/s</span>"; } else { $warning = "<span class='normal'>{$row['blok9osx']} l/s</span>"; } echo $warning; } Sorry for my English.
  • 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.