Server Validation

QuestionsServer Validation
Azhar asked 3 weeks ago

Hello Abu,

This code is not working for me, is there anything problem with this:

function add_client($data)
$check_sql = “SELECT count(*) as c from clients where statusid = 4”;

$rs = mysql_fetch_assoc(mysql_query($check_sql));

if ($rs[“c”] > 0)
phpgrid_error(“Status already exist in database”);

mysql_query(“INSERT INTO clients VALUES (null,'{$data[“params”][“name”]}’,'{$data[“params”][“gender”]}’,'{$data[“params”][“company”]}’)”);

1 Answers
Abu Ghufran Staff answered 3 weeks ago


mysql_* funtions are deprecated in php 5.5+

You should replace it with mysqli functions by referring php docs. Or
Use datagrid db layer functions to call database.

Events are supported in full version.

Abu Ghufran - Dev Team
PHP Grid Framework
Your Answer

19 + 17 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

We are sorry that this post was not useful for you!

Let us improve this post!