Hello thanks in advance
i working on project

i used query
select project_table.project_id as proid,resource_request.,sum(resource_table.resource_budget)as resourcecost,resource_table. from project_table left join resource_request on resource_request.project_id = resource_request.project_id left join resource_table on resource_table.resource_id = resource_request.resource_id GROUP BY proid
ORDER BY proid DESC

its worked but resourcecost is displaying for all project id if there is no resource used in project thnaks in advance

table is something like this
project table have project_id
resource_table have resource_id

and last table
resource_resquest hace project_id and resource_id

You have an error in your SQL query, if what you have written above is an exact copy of your code.
You have "from project_table left join resource_request on resource_request.project_id = resource_request.project_id"

You haven't included project_table in the ON clause, instaed you have referenced resource_request twice. This will cause your query to give some unexpected results.

thanks
and sorry for my silly mistake

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.