Page 1 of 1

add query to a function

Posted: Sat Jul 08, 2006 12:42 pm
by glennn.php
i'm trying to add a "create table if not exists $picId" query to this function,


Code: Select all

function edituser $picId,$firstname,$lastname,$password,$aka,$email,$url,$website,$city,$state,$talent,$biography,$approved,$customerid) {
      $sql = "update stars set picId='$picId',password='$password',email='$email',firstname='$firstname',lastname='$lastname',aka='$aka',website='$website',url='$url',city='$city',state='$state',talent='$talent',biography='$biography',approved='$approved' where customerid='$customerid'"; 
$results = $this->update($sql);
      return $results;
	    }
and haven't had any luck - also need to remove the .jpg ext that would be on the end of "$picId" in the query.

can anyone please show me how this might be done?

thanks in advance
g

Posted: Sun Jul 09, 2006 10:45 pm
by RobertGonzalez
What 'lack of luck' are you experiencing?

Posted: Sun Jul 09, 2006 10:51 pm
by glennn.php
well, i couldn't get it to create needed Table, but i finally succeeded. thanks...

Posted: Sun Jul 09, 2006 10:54 pm
by RobertGonzalez
If it's not too much to ask, could you A) Post your solution so others can benefit from you experience, and B) Rewrite your original post title to include '[SOLVED] - ' at the beginning? Thanks.