Jump to content

php changing values


Monkuar

Recommended Posts

i use this query

$result4 = $db->query('SELECT imgaward FROM users WHERE username="'.($cur_topic['poster']).'" ') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());

 

and i need to change

"'.($cur_topic['poster']).'"

or w/e to something that switches on a if statement

 

possible?

 

 

This way i dont have to have 3 query's runned per page like

 

$result4 = $db->query('SELECT imgaward FROM users WHERE username="'.($cur_topic['poster']).'" ') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());

 

$result4 = $db->query('SELECT imgaward FROM users WHERE username="'.$cur_topic['last_poster'].'" ') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());

 

and so on lol so i can save some bandwidth

Link to comment
https://forums.phpfreaks.com/topic/165764-php-changing-values/
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.