![]() Topic awaiting preservation: Determine if a WHILE function is empty (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: 127.0.0.1 |
![]() I have a MySQL fetch line like this: |
Bipolar (III) Inmate From: Berlin (almost) |
![]() I have no idea if there is a specific function/property that tells you if there are any results, but couldn't you do something like: |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
![]() If there's a way to get the length of the array returned by mysql_fetch_array($result), then you can compare that and see if it's greater than zero. |
Maniac (V) Mad Scientist From: Rochester, New York, USA |
![]() |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
![]() |
Paranoid (IV) Inmate From: New Jersey, USA |
![]() You could also use code: if (!$result = mysql_query($sql))
|