Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SQL query


Snowman_G

Recommended Posts

Posted

I have the following query:

 

$admin_file_id = tep_db_query("select admin_files_id from " . TABLE_ADMIN_FILES . " where admin_files_name = '" . $box_files_name . "'");

 

If I echo $admin_file_id it gives " Resource id #56" as result. So I'm guesing I'm forgetting something.

 

Now the query should give 1 integer value as result. How do I get this in a variable?

Posted

$admin_file_id_query = tep_db_query("select admin_files_id from " . TABLE_ADMIN_FILES . " where admin_files_name = '" . $box_files_name . "'");

$admin_file_id = tep_db_fetch_array($admin_file_id_query);

 

Variable is then held in:

 

$admin_file_id['admin_files_id']

Your online success is Paramount.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...