Author |
Message |
Homer_simpson

|
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...!!!  |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Amailer

|
|
|
|
 |
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 ... |
|
|
|
|
 |
Amailer

|
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  |
|
|
|
|
 |
Homer_simpson

|
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  |
|
|
|
|
 |
Amailer

|
Posted: Tue Aug 05, 2003 1:31 pm Post subject: (No subject) |
|
|
Wait it did nto get solved?
Hmmm
whats the error? |
|
|
|
|
 |
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 |
|
|
|
|
 |
Amailer

|
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  |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Homer_simpson

|
Posted: Fri Aug 08, 2003 4:08 pm Post subject: (No subject) |
|
|
btw i got it working using connectiong separate strings using . stupid php  |
|
|
|
|
 |
Amailer

|
Posted: Fri Aug 08, 2003 5:13 pm Post subject: (No subject) |
|
|
Homer_simpson wrote: stupid php 
PhP is not stupid...
its just the programmer...who makes his script stupid  |
|
|
|
|
 |
Homer_simpson

|
Posted: Fri Aug 08, 2003 7:06 pm Post subject: (No subject) |
|
|
ah... so that's y people sayi'm stupid...TY  |
|
|
|
|
 |
Amailer

|
Posted: Fri Aug 08, 2003 7:45 pm Post subject: (No subject) |
|
|
hmm....ya..... |
|
|
|
|
 |
|