> > $sql = "SELECT * FROM tablename WHERE 
> > tablename.column=$_GET['criteria_integer']";
> > 
> > but unfortunately, this isn't working.

On a related note, outside of strings one should always surround keys with
quotes, so:

  $arr = array('a' => 'apple', 'b' => 'banana');

  print $arr['a']; // apple
  print $arr[a];   // apple BUT this is bad

Without the quotes is bad because PHP first:

  a) looks for the constant named 'a'
  b) if constant 'a' is not found, an error of type 
     E_NOTICE is thrown.

So, let's do this:

  define('a','b');

  print $arr['a']; // apple
  print $arr[a];   // banana (no error)

Because constants are not looked for within strings, the following is
appropriate:

  print "an $arr[a]";     // an apple

As are:

  print "an {$arr['a']}"; // an apple
  print "an ". $arr['a']; // an apple

Anyway, maybe that helps explain a few things :)

Regards,
Philip Olson


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to