One more thing, when a column name has spaces, (cangen a chylch in this example), should I use the [square brackets]? I have received a syntax error.
Complete sql statement:
"SELECT enw_parti, [cangen a chylch] FROM canlyniadau AS c ".
"INNER JOIN rhaglen AS r ".
"WHERE c.RhifRhestrTestunau IN (".implode(', ', $result_numbers).") ".
"AND r.statws IN (3, 4, 5, 6, 7, 8) ";
Error message:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[cangen a chylch] FROM canlyniadau AS c INNER JOIN rhaglen AS r WHERE c.RhifRhes' at line 1
Mei