On Sun, Jan 11, 2009 at 8:59 AM, MikeP <mpel...@princeton.edu> wrote:
> Hello,
> I am trying yo get THIS:
> where ref_id = '1234'
> from this.
> $where="where ref_id="."'$Reference[$x][ref_id]'";
>
> but i certainly have a quote problem.
>
> Any help?
> Thanks
> Mike
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Looks like you're missing the single tics around ref_id.  In your
example you'd want one of these:

$where="where ref_id="."'{$Reference[$x]['ref_id']}";
$where="where ref_id="."$Reference[$x]['ref_id'];
$where=sprintf("where ref_id=%d", (int)$Reference[$x]['ref_id']); <--
use this one or else! (sql injection)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to