Author |
Message |
Homer_simpson
![](http://compsci.ca/v3/uploads/user_avatars/18138546704b4d2a3b2e50e.gif)
|
Posted: 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 Crying or Very sad](http://compsci.ca/v3/images/smiles/icon_cry.gif) |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Amailer
![](http://compsci.ca/wiki/images/1/19/Avatar.jpg)
|
|
|
|
![](images/spacer.gif) |
PaddyLong
|
Posted: 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 ... |
|
|
|
|
![](images/spacer.gif) |
Amailer
![](http://compsci.ca/wiki/images/1/19/Avatar.jpg)
|
Posted: 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
IDK thats how i started off
Still works ![Very Happy Very Happy](images/smiles/icon_biggrin.gif) |
|
|
|
|
![](images/spacer.gif) |
Homer_simpson
![](http://compsci.ca/v3/uploads/user_avatars/18138546704b4d2a3b2e50e.gif)
|
Posted: 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 Crying or Very sad](http://compsci.ca/v3/images/smiles/icon_cry.gif) |
|
|
|
|
![](images/spacer.gif) |
Amailer
![](http://compsci.ca/wiki/images/1/19/Avatar.jpg)
|
Posted: Tue Aug 05, 2003 1:31 pm Post subject: (No subject) |
|
|
Wait it did nto get solved?
Hmmm
whats the error? |
|
|
|
|
![](images/spacer.gif) |
PaddyLong
|
Posted: 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 |
|
|
|
|
![](images/spacer.gif) |
Amailer
![](http://compsci.ca/wiki/images/1/19/Avatar.jpg)
|
Posted: 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 Very Happy](http://compsci.ca/v3/images/smiles/icon_biggrin.gif) |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Homer_simpson
![](http://compsci.ca/v3/uploads/user_avatars/18138546704b4d2a3b2e50e.gif)
|
Posted: Fri Aug 08, 2003 4:08 pm Post subject: (No subject) |
|
|
btw i got it working using connectiong separate strings using . stupid php ![Razz Razz](http://compsci.ca/v3/images/smiles/icon_razz.gif) |
|
|
|
|
![](images/spacer.gif) |
Amailer
![](http://compsci.ca/wiki/images/1/19/Avatar.jpg)
|
Posted: Fri Aug 08, 2003 5:13 pm Post subject: (No subject) |
|
|
Homer_simpson wrote: stupid php ![Razz Razz](http://compsci.ca/v3/images/smiles/icon_razz.gif)
PhP is not stupid...
its just the programmer...who makes his script stupid ![Very Happy Very Happy](images/smiles/icon_biggrin.gif) |
|
|
|
|
![](images/spacer.gif) |
Homer_simpson
![](http://compsci.ca/v3/uploads/user_avatars/18138546704b4d2a3b2e50e.gif)
|
Posted: Fri Aug 08, 2003 7:06 pm Post subject: (No subject) |
|
|
ah... so that's y people sayi'm stupid...TY ![Laughing Laughing](http://compsci.ca/v3/images/smiles/icon_lol.gif) |
|
|
|
|
![](images/spacer.gif) |
Amailer
![](http://compsci.ca/wiki/images/1/19/Avatar.jpg)
|
Posted: Fri Aug 08, 2003 7:45 pm Post subject: (No subject) |
|
|
hmm....ya..... |
|
|
|
|
![](images/spacer.gif) |
|