Sqlite 4表连接显示所有记录

时间:2015-10-12 21:19:34

标签: sqlite

我有4个表,项目,project_status,发票和购买。

我有我创建的以下查询,jut无法理解超过2个表的连接类型。我创建的查询似乎只找到一条记录,但我真正想要的是显示项目表中project_status 1 - 4之间的所有记录,无论项目是否有许多相关的发票/购买记录。相关的发票/购买数据应该相加

由于

namespace MorgSimulator
{
    class Program
    {
        static void Main(string[] args)
        {
            Morg A = new MorgA();
            A.MovingTime();

            Console.ReadKey();
        }
    }
   class Morg
    {
        public Morg()
        {}

        protected MoveBehavior moveBehavior;

        public void MovingTime()
        {
            moveBehavior.move();
        }
 class MorgA : Morg
    {
        public MorgA()
        {
            moveBehavior = new Ooze();
        }
interface MoveBehavior
    {
        void move();
    }
class Ooze : MoveBehavior
    {
        public void move()
        {
            int row = 40, col = 25;
            Console.CursorVisible = false;
            Console.SetCursorPosition(col, row);

            int direction = 0;
            Random r = new Random();

            for (int i = 0; i < 25; i++)   // count of movement
            {
                Console.Write("<(._.)>");
                System.Threading.Thread.Sleep(100);
                Console.Clear();

                direction = r.Next(5);

                while (direction == 0)
                    direction = r.Next(5);

                switch (direction)
                {
                    case 1:
                        if (row + 1 >= 80)
                            row = 0;
                        Console.SetCursorPosition(col, row++);
                        break;
                    case 2:
                        if (row - 1 <= 0)
                            row = 79;
                        Console.SetCursorPosition(col, row--);
                        break;
                    case 3:
                        if (col + 1 >= 50)
                            col = 0;
                        Console.SetCursorPosition(col++, row);
                        break;
                    case 4:
                        if (col - 1 <= 0)
                            col = 49;
                        Console.SetCursorPosition(col--, row);
                        break;
                }
            }
        }
    }

0 个答案:

没有答案