PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: Posting Code in the Forums to learn how to do it too.
$wc202Array = array(
//in here I have around 150 entries
);
$sql = '';
foreach($wc202Array as $wc)
{
$sql .= "In here I have a select statment and unions the others as it loops through";
}
$sql = substr($sql, 0, -6); //get rid of last "union"
$stmt = OCIParse($connection, $sql);
OCIExecute($stmt);
How many entries can I have in my array? I have heard that it depends on the menory_limit in the PHP.ini file. Is there any faster way to do this code?
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: Posting Code in the Forums to learn how to do it too.
Technically I guess there would be a limit, but it's extraordinarily high. The default memory limit is 8MB. Have you ever looked at an 8MB text file? There's tons of stuff in there. For the vast majority of practical applications, the size of arrays can be considered infinite.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
The sql statment totals then length of a cable, or sums the number of records depends on what it's conuting. Then it displays it inside a table. Some php pages have about 10 different sql statements with loops.