Jump to content


CREATE TABLE query added to a function

  • Please log in to reply
1 reply to this topic

#1 glennn.php

  • Validating
  • PipPipPip
  • Advanced Member
  • 251 posts
  • LocationAtlanta, GA USA

Posted 08 July 2006 - 04:39 PM

i need to add a "CREATE TABLE IF NOT EXISTS $picId" query in this. for some reason my attempts have failed - can this be done?

   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;

(also, $picID will have a .jpg extension which needs to be removed)

can anyone help me with this? thanks in advance


#2 fenway

  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 08 July 2006 - 06:13 PM

$picId? Your table is called "stars".  I'm confused.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users