hello there I have PHP query that Fetch Records from a database with where condition I have four pages in WebSite I want to Fetch data from DataBase with where Condition Ever pages Fetch own Content From database Through link It's my query that's not work

Prefix already in config file 

```
$prefix     = 'v1_';

$link = $p['link'] ;
    $data_query = $db->query("
        SELECT * FROM ".$prefix.$key." 
        WHERE "$p['link'] = $link "
      "); 

```

In WebSite pages are Define with key $x 

```
$x = 'about';
$pages[$x]['title']  = 'About Us';
$pages[$x]['link']   = 'about_us';
$pages[$x]['source'] = 0;

```

and same variable and own info in both pages 

```
$x = 'objects';
$x = 'services';

```

and I'm using this query in website its work fine but now I want to change that I mention above details 

```
 $data_query = $db->query("
    SELECT * FROM ".$prefix.$key." 
    WHERE online = 1 ;
  ");

```

Any contributors to this post, I thank you for your help :)