Welcome Guest, Not a member yet? Register   Sign In
Newb, having problems with Active Record, results in syntax error
#2

[eluser]Phil Sturgeon[/eluser]
One annoying thing about using Simple XML is that values do not have the correct types. It's not recognising that the values are strings so fails to add " round them.

Try type-casting:

Code:
$data[‘director’]  = (string) $movie->directors->director;
$data[‘spilletid’]  = (int) $movie->movie_duration;
$data[‘premiere’]  = (int) $movie->regions->region->products->product->premiere;
$data[‘type’]      = (string) $movie->regions->region->categories->categorie;
    
$this->db->insert(‘movies_trailer’, $data);


Messages In This Thread
Newb, having problems with Active Record, results in syntax error - by El Forum - 12-29-2008, 06:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB