President Trump’s shutdown logic seems to have been that if he made his demand for a wall loud enough and inflicted enough pain, Democrats would give in. They didn’t. That should be the final word on shutdowns: Taking the country hostage is not an effective negotiating strategy.

Speaking from the Rose Garden on Friday, Trump endorsed a bill that would temporarily reopen the government for three weeks.

The stopgap legislation comes as federal agencies were facing severe pressure points and federal employees were set to go without two consecutive paychecks. In addition, federal courts were close to running out of money, air travel unions issued a dire warning about flight safety risks, and the Coast Guard, the FBI, and other key services were operating without funds, among other increasingly painful federal shortages.

Endorsing this proposal is not victory for Trump. After willingly taking the blame for the shutdown in December, the punishing effect of the lack of federal funds for key agencies has eroded public support and dampened the economy. After 34 days of uncertainly, Trump emerged empty-handed on his signature campaign goal of building a wall.

The president is not likely to take that defeat lightly and could well be goaded into again fighting for the wall.

Indeed, the continuing resolution, although ending the current impasse, does not foreclose this possibility. With funding only guaranteed for a few weeks, when the money runs out there could well be another high-stakes debate over border security — and potentially another shutdown.

Trump, a self-proclaimed great negotiator, however, should learn the lesson from holding the government hostage and having nothing to show for it: Shutdowns don't work. He hurt the economy, the government, and his support, getting precious little in return.

Real progress on immigration will have to come from Congress and will be done with compromise, not demands and shuttered agencies. With the government on its way to reopening, lawmakers should get to work.