Topic: Problem in Database information retrieval.

Hi, actually i created a custom table and add some fields, which are necessary to bring to the login page. but the problem is when use the following functions it will return the proper result on some other page. but the same query does not work on login.php page.

Can you help me to identify the problem in the query using in login page...

$sql="SELECT * FROM ".TB_PREF."kv_sys_prefs LIMIT 1";
    
    $result = db_query($sql, "could not Process");
   
    $kv_week_day_details = db_fetch($result);
   
    echo json_encode($kv_week_day_details);

Subscription service based on FA
HRM CRM POS batch Themes

Re: Problem in Database information retrieval.

mysql operations doesnot work on login.php. What should i do now?

Subscription service based on FA
HRM CRM POS batch Themes

3 (edited by apmuthu 09/08/2014 05:30:48 am)

Re: Problem in Database information retrieval.

If kv_ is the TBPREFIX then it it is redundant. If it is a custom table, then check what condition makes it a specific record tied in with the $_POST variables from the login form. Also see if the scope and visibilityof the variables used is correct. Which file are you putting this code in?

4 (edited by kvvaradha 09/09/2014 04:46:03 am)

Re: Problem in Database information retrieval.

Actually , the table name is  0_kv_sys_prefs.  The problem is , its not working any mysql operations. it works after logged into the working area. the results gets exactly.

Which one prevent the Mysql functions in the login.php

is it preventing for sql injection or hijacking issues?

and guide me the safest thing to handle this operation.

Subscription service based on FA
HRM CRM POS batch Themes

Re: Problem in Database information retrieval.

Have you included the connect_db file?

Re: Problem in Database information retrieval.

Unless you post the code in it's entirety, we cannot debug phantom entities.

Re: Problem in Database information retrieval.

Thanks, both of you. i found the solution actually.

The problem is loging.php doesnot have the db connection. i mean, it doesnot have direct php script to query database. May be this is for security reasons. so i just created jshttprequest call method to perform my operations.,..

Now my issue is resolved.

Subscription service based on FA
HRM CRM POS batch Themes