Question: I'm trying to search for rows that contain a certain string.
For that, I'm using the following query:

```
SELECT `1` as 'msgTime',
       `4` as 'shout'
FROM   log.shout_log' WHERE shout LIKE '".$name."' ORDER BY 1 DESC

```

I'm getting `$name` from:

```
$name = $_GET['name'];

```

My url:
./shout\_log.php?name=Montz

But I encounter the following error:

> 
> You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' WHERE shout LIKE 'Montz' ORDER BY 1 DESC' at line 1
> 
> 
> 

Everything is to return a message that this name shouted.

```
$ms = $row['shout'];
echo '<span style="color:blue;">'.$ms.'</span>'; 

```

Whats wrong with my query?

EDIT: 

```
$name = "%".$_GET['name']."%";
    $info = mysql_query("SELECT `1` as 'msgTime', `4` as 'shout' FROM log.shout_log WHERE 'shout' LIKE '$name'") or die(mysql_error()); 
    echo '<table><tr><th>Data</th><th>Menssagem</th></tr>'; 
    while($row = mysql_fetch_object($info)){ 
        echo '<span style="color:blue;">'.htmlspecialchars($row->shout).'</span>'; 
    } 
    echo '</table>'; 

```

Answer: 
You could log to the console AND non-volatile storage at the same time.

You can either use a custom logging function, or overload `console.log`:

```
console._log = console.log;
console.log = function() {
  var args = arguments;
  console._log.apply(console, args);
  chrome.storage.local.get({consoleLog : []}, function(data) {
    data.consoleLog.push(args);
    chrome.storage.local.set({consoleLog: data.consoleLog});
  });
}

```

Of course, it should probably only be used while you're actively debugging.
Try create a pageLog function and send objects to be logged on the page side.