Jump to content

Cholotron

New Members
  • Posts

    4
  • Joined

  • Last visited

Cholotron's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Sic? Period? Are you ok man? If you are constipated I can send you prunes... You know? To easy your Mornings
  2. Function web_name($the_id) { global $ms_sql, $sql_server,$local_ip, $local_user; $var_sql = "select page_name from web_pages where page_id='$the_id';"; $ms_conn = sqlsrv_connect($sql_server, $ms_sql); $result = sqlsrv_query($ms_conn,$var_sql); while ($row = sqlsrv_fetch_array($result)) { return $row['page_name']; } sqlsrv_close($ms_conn); } Happy now?
  3. Hi, my funct is inside a funcionts.php file Variables are declare at the top. All my pages have error code handling Question how can I change to code to avoid the while loop? <?php //Start php ini_set('display_errors', TRUE); error_reporting(E_ALL); // Global Variables $ms_sql = array( "Database"=>"WEBSQL", "UID"=>"xxxx_user", "PWD"=>"xxx2003"); $sql_server = "INTRANET"; $local_ip = getenv("REMOTE_ADDR") ; $local_user = gethostbyaddr($_SERVER['REMOTE_ADDR']); ....... ?> Thank you All
  4. Good Morning, (First post) I have modified several functions. They no longer need 2 variables, just one. But they still working fine when I send two variables. Why there is not error? Function web_name($the_id) { $var_sql = "select page_name from web_pages where page_id='$the_id';"; $ms_conn = sqlsrv_connect($sql_server, $ms_sql); $result = sqlsrv_query($ms_conn,$var_sql); while ($row = sqlsrv_fetch_array($result)) { return $row['page_name']; } sqlsrv_close($ms_conn); } Thank you All,
×
×
  • 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.