Hello, I was checking the error_log file and I noticed its having the following thing in it plenty of times. While checking the jso-themes.php on line number 61, we have the following coding. $url = mysql_result($query, 0); PHP: Please suggest how to fix this. -Regards.
$query = mysql_query("SELECT DISTINCT(brand) FROM `urls` WHERE `type` = '{$_GET['type']}' ORDER BY `brand` ASC"); if(mysql_num_rows($query) > 0) { while($row = mysql_fetch_assoc($query)) { $data[] = $row; } } PHP:
Before even attempting to figure out your code let me advise to NEVER place a session var inside an sql query. You need to escape and validate ALL variables that are used in sql queries to prevent code injection. Currently that sql is a huge security rick for your db/account, all shared accounts on the server and the entire server. Be sure to always check your connections/db selections/queries The below should print out the mysql error: if (!$query) { die('Query failure: ' . mysql_error()); } PHP: You can also check your query by printing it out: print 'Query: ' . $query; PHP: Also take a look at using mysqli or PDO as mysql will soon be depreciated as a php fucntion.
Many Errors? He had only 4 lines of programming!! Although if you see an error, you can tell him about, and the solution
I believe his reply was more so random spam and wasn't directed at anyone specifically. Probably just trying to up his/her post count.