Database variable causes search to terminate

Development discussion on DGS Search.

Moderator: DGS Search Developer

Database variable causes search to terminate

Postby timofee » Thu Dec 24, 2009 6:19 pm

I've been using DGS Search for several years and on multiple sites due to it's speed and configurability.

On one of the larger sites I've started to get prices from a MySQL database and insert them into pages using PHP. I now have the problem that DGS Search will only search a page as far as the price code. This means that although the whole page is displayed correctly in the browser any text after the price code is not searched. I'm pretty sure that there is nothing wrong with my code and wondered if anyone else had encountered this problem.

I extract the price from the database thus:
Code: Select all
<?php $result = @mysql_query("SELECT price_exc_vat FROM products where product_code = 'CB501'"); { while ( $row = mysql_fetch_array($result) ) { $cb501exc=$row["price_exc_vat"]; }} ?>

An insert it thus:
Code: Select all
<p class="2010">Our Price: <strong>&pound;<?php echo "$cb501exc" ?> exc. VAT</strong> (per carton of 50 x 2 metre lengths)</p>

I'd appreciate any pointers here.

Best wishes,
Posts: 1
Joined: Thu Dec 24, 2009 5:16 pm

Return to DGS Search

Who is online

Users browsing this forum: No registered users and 2 guests