Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

How to make PHP handeling my "WITH CTE as" SQL

SELECT `_ID`, `weight_date`, `weight_start_week`, `weight_end_week`
       total_weight, prev_total_weight, lowest_weight, highest_weight,
       weight_week,
       CASE ...
FROM
(
    -- place CTE definition here
    SELECT *, ...
           ROW_NUMBER() OVER( ORDER BY weight_date DESC) AS RowNum
    FROM ...
) t;
 
PREVIOUS NEXT
Tagged: #How #PHP #handeling #CTE #SQL
ADD COMMENT
Topic
Name
7+6 =