User Profile

Collapse

Profile Sidebar

Collapse
parallax
parallax
Last Activity: May 23 '07, 01:35 PM
Joined: Apr 20 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • parallax
    started a topic code problem
    in PHP

    code problem

    Hi guys

    i have 2 problem

    first,
    how could i create this view as a decimal on the total_miss field

    [HTML]CREATE VIEW miss AS SELECT name, SUM(missing) AS total_miss FROM data where month (date) = 04 group by name;[/HTML]

    second,
    when i'm in the mysql's shell this line works well, but i could make the the php's code...

    [HTML]select e.name, e.salario, a.total_adv,...
    See more | Go to post

  • parallax
    replied to Create a temporary table using php
    thanks... i was using create table because on the mysql's shell works ok....

    thanks a lot
    See more | Go to post

    Leave a comment:


  • parallax
    started a topic Create a temporary table using php

    Create a temporary table using php

    Hi guys,

    i would like to make
    create temporary table pagamentos SELECT d.name, SUM(advanced) AS total_advance, f.salario FROM data d JOIN empregados f ON f.name = d.name where MONTH(d.date) = 04 group by name;

    and after select all

    select * from pagamentos;

    in a php script... could someone help me???

    thanks


    Danylo Iamaguchi
    See more | Go to post

  • parallax
    started a topic create a temporary table
    in PHP

    create a temporary table

    hi guys,

    how could i create and send this
    [HTML]SELECT d.name, d.missing, f.salario, (SELECT SUM(advanced) FROM data d2 WHERE d.name=d2.name) AS AdvanceSum from data d JOIN empregados f ON f.name = d.name where MONTH(d.date) = 4 group by name;[/HTML]
    to a temporary table??
    i have to add this select in a temporary table and make a calculation between the sum(advanced) and the f.salario but i have no idea of how...
    See more | Go to post

  • parallax
    replied to Sum function
    Code:
    "SELECT name, SUM(advanced) AS total_advance FROM data GROUP BY name where MONTH(date) = 04";
    why does it not work?????
    See more | Go to post

    Leave a comment:


  • parallax
    replied to Sum function
    Thanks a lot...
    See more | Go to post

    Leave a comment:


  • parallax
    started a topic Sum function

    Sum function

    Hi Guys,

    this is my table

    mysql> select * from data;
    +------------+-----------------------------+---------+----------+
    | date | name | missing | advanced |
    +------------+-----------------------------+---------+----------+
    | 2007-04-05 | Abraao | 2 | |
    | 2007-04-06 | Adeilson Sousa | | 50,00...
    See more | Go to post

  • parallax
    started a topic SUM function 2 different fields in 2 tables
    in PHP

    SUM function 2 different fields in 2 tables

    Hi guys,

    I am trying to sum the values of two fields in 2 tables check by the name of the people in mysql, i'm not sure how to get the SUM function to make this work.

    Danylo
    See more | Go to post

  • sorry, i forgot tell that i have to check the name as well before sum the values...

    thanks


    Danylo
    See more | Go to post

    Leave a comment:


  • Hi guys,

    i have the same problem but the fields are in a diffenret table, could u help me please????
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...