EllisLab text mark
Advanced Search
     
Coffee Levels critical!!! Cannot function anymore…
Posted: 05 September 2007 11:47 PM   [ Ignore ]
Avatar
Joined: 2007-02-08
409 posts

Hey all,

Simple problem, tired eyes….


function

//$filedata = $this->upload->data();
$data['file_name'$data['file_name'];
$file_name $data['file_name'];
$user_id $this->session->userdata('id');
                    
// update profile
$sql "UPDATE profile SET file_name = $file_name WHERE user_id = $user_id LIMIT 1";
$query  $this->db->query($sql); 

Error

Error Number1109

Unknown table 
'67bfa84ce291b67e0c85322e4b2ee20f' in field list

UPDATE profile SET file_name 67bfa84ce291b67e0c85322e4b2ee20f.jpg WHERE user_id 5 LIMIT 1 


Someone with fresh eyes wanna point out what is wrong? It is not updating at all however “file_name” exists in the db and the user id is correct…

 Signature 

you’ve got that sexy Canadian thing working for you… - Derek Allard


Pancake Payments | http://DearIE6.com
http://twitter.com/thatleeguy

 
Posted: 06 September 2007 12:43 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2007-08-03
52 posts

You just missing ‘’ this in query .
The $sql will be look like. 
$sql = “UPDATE profile SET file_name = ‘$file_name’ WHERE user_id = $user_id LIMIT 1”;


Thanks
Saidur Rahman

 
Posted: 06 September 2007 03:02 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2007-02-08
409 posts

Doh! It interprets it as a join…...

THANKS!

 Signature 

you’ve got that sexy Canadian thing working for you… - Derek Allard


Pancake Payments | http://DearIE6.com
http://twitter.com/thatleeguy