[ale] [OT] php help

ChangingLINKS.com x3 at ChangingLINKS.com
Sat Sep 14 14:28:00 EDT 2002


09-14-02 1247
Having decided that my Linux admin skillwz are wack, I have been learning to 
program over the last few days. I have gotten all of the code done except 
this problem:

Easy question:
Currently, I am running a script that starts like this:

	$sql = "select * from table where number="1";
	$res = mysql_query($sql);
	if( mysql_num_rows( $res ) > 0 )
	{
	DO THIS PROCESSING;

I know that once the processing is done, there will be no more records where 
number="1" I need to run a different query if $res = 0  So, do I?:

$sql = "select * from table where number="1"
	$res = mysql_query($sql);
	if( mysql_num_rows( $res ) > 0 )
	{
	elseif 
$sql = "select * from links";
	{
	DO THIS PROCESSING;

I just don't want to have to put the else at the bottom and repeat all of the 
code.

-- 
Wishing you Happiness, Joy and Laughter,
Drew Brown
http://www.ChangingLINKS.com

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list