Error: MySQL - operand should contain 1 column.
P粉529245050
2023-07-24 18:17:13
<p>This query works when I type it directly into MySQL, but not in C#. </p>
<pre class="brush:php;toolbar:false;">double deltaTime = (DateTime.Now - collectTime).TotalSeconds;
string query = String.Format("UPDATE buildings LEFT JOIN server_buildings ON buildings.global_id = server_buildings.global_id AND buildings.level = server_buildings.level SET buildings.storage = buildings.storage (server_buildings.speed * {0} * IF(buildings. boost >= NOW(), 2, 1)) WHERE buildings.global_id IN('generator', 'test')", deltaTime / 3600d);</pre>
<p>Just got the error MySQL - operand should contain 1 column. Thanks for the suggestion! :)</p><p>It is expected to increase in value in "storage" over time. </p><p><br /></p>
I'm relatively new to MySQL. This is a query with parameters.