Can I retreave a variable from mySQL database while I am doing UPDATE?

I'm running this query:

if($ModifiedInGoogle != $row['ModifiedInGoogle']) {
  // run update query
  mysql_query("UPDATE events 
                  SET EventName = '$EventName', 
                      StartDate = '$StartDate', 
                WHERE GoogleID = '$GoogleID' ");

If the EventID variable is not being changed in the UPDATE, is there a way I can get it and assign it to an $EventID variable here?

Answers


No. UPDATE queries are for putting data into the database. If you want to retrieve data, then you use a separate SELECT query.


Need Your Help

Call a Method that have object parameters from a BizTalk scripting functoid

c# biztalk biztalk-2009

I need to call a method in an external assembly from a scripting functoid in a BizTalk map, in particular a Enumerated type is a parameter in a C# assembly. Is this even possible? I have passed in

Is it possible to specify what index a query should use in Mongoid?

ruby mongodb mongoid

MongoDB seems like it is using an inefficient query pattern when one index is a subset of another index.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.