[svlug] PHP database code not...
Jesse Monroy
jesse650 at gmail.com
Wed Nov 12 20:59:07 PST 2014
SEE BELOW
On 11/12/14, Michael Robinson <plug_1 at robinson-west.com> wrote:
> working as expected.
>
> postgres=# select * from computers where computer_name='open';
> computer_name | computer_id
> ---------------+-------------
> open | 112
> (1 row)
>
> postgres=# select * from computers;
> computer_name | computer_id
> ---------------+-------------
> cheetah | 100
> eagle64 | 101
> heron | 102
> heron64 | 103
> penguin | 104
> tuna | 105
> ultravision | 106
> luke | 107
> barbara | 108
> wii | 109
> silene | 110
> swan | 111
> open | 112
>
> The database is postgresql-9.3.
> So the psql command output on the database host is above and the
> following PHP code doesn't produce similar results:
>
> ...
> foreach ( $_POST['computers'] as $setcomp )
> {
> chop ($setcomp);
>
> $query = "SELECT * FROM computers WHERE computer_name ";
>
WHERE computer_name (?)
Jesse
More information about the svlug
mailing list