Posted by Jerry Stuckle on 11/07/07 01:11
Austin wrote:
> $lines = file("list.txt");
> $l_count = count($lines);
>
> for($i = 0; $i < 3; $i++) {
> $var = $lines[$i];
> }
>
> mysql_query("SELECT name FROM list WHERE name='$var'");
>
>
>
> In the list.txt it would have data like:
> Code:
>
> One
> Two
> Three
>
>
>
> And "echo $list[0];" would come up as "one".
>
> I need to SELECT the name "one" and return the column data.
>
> It doesn't select anything, even though it does get the data correctly
> when echo'd. What's wrong?
>
> OR am I going the wrong way w/ this? :x
>
>
You don't show any place where you're are actually getting the data.
How about posting all of your code?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|