0

I have a two-dimensional array like this:

$data = array(
   1 => array(
    id => 1,
    software_id => 121,
    name => "Microsoft Office 2010",
    version => 14.0.4763.1000
   ),
   2 => array(
    id => 2,
    software_id => 121,
    name => "Windows Live Movie Maker",
    version => 14.0.4763.1000
   )
 ...
)

And I have set of data like this in the database. The array must match the values of the SQL or else a new set of values in the array are added or removed.

  1. How am I able to compare if the array exactly matches the values with the same column values as the array in the database?
  2. How am I able to check if a new set of values are added in the array and not present in the database?
  3. How am I able to check if a set of values are removed in the array and not present in the database?
user352156
  • 99
  • 1
  • 4
  • 14
  • 1
    have you tried anything so far ? – Alex Dec 29 '14 at 15:47
  • haven't tried anything yet – user352156 Dec 30 '14 at 05:06
  • See [w3schools.com: SQL WHERE Clause](http://www.w3schools.com/sql/sql_where.asp) and [Stack Overflow: Are there good Tutorials on how to use PDO?](http://stackoverflow.com/questions/1943069/are-there-good-tutorials-on-how-to-use-pdo) and then try to make your question clearer and less broad – xmojmr Dec 30 '14 at 07:25

0 Answers0