Skip to content

Instantly share code, notes, and snippets.

@jlogsdon
Created September 2, 2009 16:12
Show Gist options
  • Save jlogsdon/179796 to your computer and use it in GitHub Desktop.
Save jlogsdon/179796 to your computer and use it in GitHub Desktop.
<?php
$result = mysql_query("SELECT * FROM content_field_hours LIMIT 1");
while ($row = mysql_fetch_assoc($result)) {
var_dump($row);
}
/* Outputs
array(3) {
["vid"]=>
string(4) "1451"
["nid"]=>
string(3) "705"
["field_hours_value"]=>
NULL
}
Same query in mysql cli:
mysql> SELECT * FROM content_field_hours LIMIT 1;
+------+-----+-------------------+
| vid | nid | field_hours_value |
+------+-----+-------------------+
| 1451 | 705 | NULL |
+------+-----+-------------------+
1 row in set (0.00 sec)
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment