Displaying 5 results from an estimated 5 matches for "mysql_fetch_array".
2009 Dec 14
1
AGI with PHP
...password)
or die('Could not connect: ' . mysql_error());
mysql_select_db($my_database) or die('Could not select database');
// Performing SQL query
$result = mysql_query($query_calls) or die('Query failed: ' . mysql_error());
// Printing results in HTML
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
foreach ($line as $col_value) {
$callnum = $col_value;
}
}
// Performing SQL query
$result = mysql_query($query_cb_calls) or die('Query failed: ' . mysql_error());
// Printing results in HTML
while ($line = mysql_fetch_array($result, MYSQL_ASSOC))...
2004 Aug 06
2
XML statistics on remote server
what i did in this situation was dump the stats/status file to the local
server through a lynx --dump call from php .. and then i also update a
sql table to reflect the changes so i can poll that instead ..
a.
<p>On Thu, 26 Feb 2004, MacSym wrote:
>
> Hi everybody,
>
> I am wondering if it is possible to generate the XML/XSL files on a remote
> server (status.xsl,
2006 Dec 18
2
AGI Help Please
...if (($env == "") || ($env == "\n")) {
break;
}
}
// main program
$clid = $agi[callerid];
connect_db();
$query1 = "SELECT * FROM cdr WHERE dst = '$clid' ";
$query_result1 = @mysql_query($query1);
$row_count = mysql_num_rows($query_result1);
$row1 = @mysql_fetch_array ($query_result1);
fputs($stdout,"There have been\n");
fputs($stdout,"$row_count calls made\n");
fflush($stdout);
fclose($stdin);
fclose($stdout);
exit;
?>
There are no debug errors and the query is going through just fine... and
yes, I chmod 755.
Does anyone have a clue wh...
2007 Aug 24
0
MYSQL problem and configuration
...;;
$username= 'xxxxx';
$password= 'xxxx';
$dbprotect = mysql_pconnect($hostname, $username, $password) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_select_db($database, $dbprotect);$result = mysql_query("SELECT * FROM user_table WHERE user_age>12");while($entry = mysql_fetch_array($result)) {fwrite(STERR, "Name : $entry['name'], Age: $entry['age'] \n");fflush(STDOUT);$result = trim(fgets(STDIN,4096));checkresult($result);}?>It will return things on the asterisk CLI.... You can adapt this example for youI don't know if it help but it shows a...
2009 May 27
1
PHP AGI Problems
...t += 1;
$AGI->send_cmd("EXEC PLAYBACK /bswitch/menu/invalid-msg-id");
}
else{
echo "\ndebug: ($msg_id) okay valid msgid, lets check sql\n";
$msg_result=check_msg($msg_id);
if(!$msg_result){
$error_count +=1;
}
}
}
$row = mysql_fetch_array($messageresult);
$AGI->send_cmd("EXEC CONTROL STREAM FILE $row[path]");
$AGI->send_cmd("EXEC PLAYBACK beep");
function check_msg($ID){
$msg_result=$database->querydb("**********sql query filtered**********");
return $msg_result;
}
?>
<?php...