Re: [PHP] Coding Question

2004-12-13 Thread Justin French
On 07/12/2004, at 6:50 AM, Al wrote: Jason Wong wrote: On Monday 06 December 2004 14:19, Rory Browne wrote: If I'm not mistaken Al wanted to return something if the thing failed, without having to put it inside an if_block. I'm watching this with curiosity, because return is a language

Re: [PHP] Coding Question

2004-12-06 Thread Richard Lynch
Al wrote: I've searched the PHP manual and can't find an answer for this question I'd like to use the OR DIE construct; but instead of DIE I'd like to use RETURN FOO. I haven't found a way to do it. $string= file_get_contents($filename) OR die(Could not read file); $db_link=

Re: [PHP] Coding Question

2004-12-06 Thread Al
Jason Wong wrote: On Monday 06 December 2004 14:19, Rory Browne wrote: If I'm not mistaken Al wanted to return something if the thing failed, without having to put it inside an if_block. I'm watching this with curiosity, because return is a language construct, and not a function, or anything that

Re: [PHP] Coding Question

2004-12-06 Thread Richard Lynch
Al wrote: Essentially, I'm creating warning reports for my users, not code errors. The users can then email the warnings to our webmaster. Jason Wong wrote: On Monday 06 December 2004 14:19, Rory Browne wrote: $result = mysql_db_query($db,select count(*) from $table)

Re: [PHP] Coding Question

2004-12-06 Thread Al
Richard Lynch wrote: Al wrote: Essentially, I'm creating warning reports for my users, not code errors. The users can then email the warnings to our webmaster. Jason Wong wrote: On Monday 06 December 2004 14:19, Rory Browne wrote: $result = mysql_db_query($db,select count(*) from

Re: [PHP] Coding Question

2004-12-05 Thread Ligaya Turmelle
snip $db_link= mysql_connect($host, $user, $pw) OR die(Could not connect: . mysql_error()); /snip try: $db_link= mysql_connect($host, $user, $pw); if (!$db_link){ // do whatever if there is something wrong } maybe try something like that with the file_get_contents also? Respectfully,

Re: [PHP] Coding Question

2004-12-05 Thread Rory Browne
If I'm not mistaken Al wanted to return something if the thing failed, without having to put it inside an if_block. I'm watching this with curiosity, because return is a language construct, and not a function, or anything that has a value. I could probably have said that better sober, and not at

Re: [PHP] Coding Question

2004-12-05 Thread Jason Wong
On Monday 06 December 2004 14:19, Rory Browne wrote: If I'm not mistaken Al wanted to return something if the thing failed, without having to put it inside an if_block. I'm watching this with curiosity, because return is a language construct, and not a function, or anything that has a value.

Re: [PHP] Coding Question

2003-07-20 Thread Justin French
Retrieving the results can be LIMITed to X results starting at row Y using mysql's LIMIT function. Check the MySQL manual, but basically, this will limit the result to 10 rows, starting with row 5. SELECT name FROM customers LIMIT 5,10 By taking your values for the starting point and row