Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Unknown database problem
Index -> Programming, PHP -> PHP Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Homer_simpson




PostPosted: Tue Aug 05, 2003 1:33 am   Post subject: Unknown database problem

this is my command
code:


<?
include 'mysqlfunctions.php';
$link=connectmysql();
mysql_select_db("backstabbers");

$query="UPDATE userinfo SET ps='$passid' WHERE id='$id'";
$result = MySQL_query ($query,$link);

?>



I get no error or warning but the thing just doesn't work...!!! Crying or Very sad
Sponsor
Sponsor
Sponsor
sponsor
Amailer




PostPosted: Tue Aug 05, 2003 1:44 am   Post subject: (No subject)

Could you post the connectmysql function
(all passwords taken out and replaces with PASSWORD Very Happy)

Damm mac can't do anything on it!

EDIT:
k try this... hmm

code:

<?
include 'mysqlfunctions.php';  //I think this is the file name hmm...

$link = connectmysql();

mysql_select_db("backstabbers" ,$link);

$result = mysql_query("UPDATE userinfo ". "SET pas='$passid' . "WHERE id='$id'");

?>


if i did not make any mistakes -.- it should be right Very Happy
PaddyLong




PostPosted: Tue Aug 05, 2003 1:07 pm   Post subject: (No subject)

I think that
$result = mysql_query("UPDATE userinfo ". "SET pas='$passid' . "WHERE id='$id'");

should be more like

$result = mysql_query("UPDATE userinfo SET pas=".$passid." WHERE id=".$id);

you had your .'s in places where they shouldn't be and stuff ...
Amailer




PostPosted: Tue Aug 05, 2003 1:17 pm   Post subject: (No subject)

Hmm...
It don't matter...

The . is just to seperate the stuff,
cuz i just find it better that way Very Happy

IDK thats how i started off Confused
Still works Very Happy
Homer_simpson




PostPosted: Tue Aug 05, 2003 1:29 pm   Post subject: (No subject)

well that connectmysqlf function works properly i'm sure of it cuz i use it in everyfile... and i didn't need to use any . when i wanted to insert to mysql... this is one of those errors that's gonna take me sometime to figure out Crying or Very sad
Amailer




PostPosted: Tue Aug 05, 2003 1:31 pm   Post subject: (No subject)

Wait it did nto get solved?
Hmmm
whats the error?
PaddyLong




PostPosted: Tue Aug 05, 2003 2:27 pm   Post subject: (No subject)

the . is used to attach two strings ... like in turing you do like
someString := string1 + " " + string2
in PHP it's
$someString = $string1 . " " . $string2
Amailer




PostPosted: Tue Aug 05, 2003 2:42 pm   Post subject: (No subject)

Ya,
But still i like it that way...thats how i learned it Very Happy
Sponsor
Sponsor
Sponsor
sponsor
Homer_simpson




PostPosted: Fri Aug 08, 2003 4:08 pm   Post subject: (No subject)

btw i got it working using connectiong separate strings using . stupid php Razz
Amailer




PostPosted: Fri Aug 08, 2003 5:13 pm   Post subject: (No subject)

Homer_simpson wrote:
stupid php Razz


PhP is not stupid...

its just the programmer...who makes his script stupid Very Happy
Homer_simpson




PostPosted: Fri Aug 08, 2003 7:06 pm   Post subject: (No subject)

ah... so that's y people sayi'm stupid...TY Laughing
Amailer




PostPosted: Fri Aug 08, 2003 7:45 pm   Post subject: (No subject)

hmm....ya.....
Display posts from previous:   
   Index -> Programming, PHP -> PHP Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 12 Posts ]
Jump to:   


Style:  
Search: