Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is there something wrong with this code

Status
Not open for further replies.

wolf73

Programmer
Feb 12, 2006
93
CA
$loginupdate= mysql_query("update wholeseller_profile set last_login = '$putdate' where email ='$email '" )
or die("Couldn't execute query: " . mysql_error());

this sql exectues fine. But I was wondering shouldn't it be
mysql_query("update wholeseller_profile set last_login = '$putdate' where email ='$email '" )
or die("Couldn't execute query: " . mysql_error());


with out $loginupdate at start
 
It works the same way, the only thing that $loginupdate does is catch the results for the mysql_query

Its quite pointless for an update as it returns no result set.
but if it where say a select statement such as:
Code:
SELECT *FROM mytable

It would catch the resultset which could then be used in [blue]mysql_fetch_array[/blue] or [blue]mysql_fetch_assoc[/blue]



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top