Posted by David Haynes on 02/14/06 23:14
Howard wrote:
> The script runs but there is no data. I get blank page.
>
> I copied the info for making a config.php file.
> So I guess I want to try using an include statment to call those files and
> see if
> that works.
> The scripts were copied right from the CD-ROM so I don't know why the
> echo statements don't seem to be doing anything.
>
> I put a require ('config.php') in the script. Still nothing shows up and no
> errors in
> the apache log.
>
> I have a feeling that it has to do with a configuration file with php or
> mysql.
>
> Thanks So far
>
> Howard
>
>
> "David Haynes" <david.haynes2@sympatico.ca> wrote in message
> news:LXnIf.23728$Hj6.11243@fe29.usenetserver.com...
>> Dave Mennenoh wrote:
>>>>> $query = select * from books where ".$searchtype." like
>>>>> '%".$searchterm."%'" ;
>>> Besides missing the leading quotation mark, you might like to know that
>>> you don't need to do concatenation like this using PHP - so you can
>>> simply do this:
>>>
>>> $query = select * from books where $searchtype like '%$searchterm%'" ;
>>>
>>> weird huh!
>>>
>> You also might like to use a format like:
>>
>> $query = <<<EOQ
>> SELECT *
>> FROM books
>> WHERE {$searchtype} LIKE '%{$searchterm}%'
>> EOQ;
>>
>> Which make the whole query a lot clearer to those used to SQL CLI
>> environments.
>>
>> -david-
Why not post snippets of your database connection code, your query
execution code and your html display code? It's very difficult to help
you with no examples...
-david-
[Back to original message]
|