1 person found this helpful
This is sql / php question. Not a Flex question. But you could do
SELECT video.video1 AS VID1 , video.video2 AS VID2 , video.video3 AS VID3 WHERE ref=$ID;
then you get an array with the parameters as the names above which will be called $resultArray
if( $resultArray['VID1'] == null )
else if( $resultArray['VID2'] == null )
// add to video2
Some tick marks are missing , but the point remains.
If this post was helpful please mark it as such.
Ok i have been working on this a little more, and this is what my script looks like at the moment
$mysql = mysql_connect($this->db_host, $this->db_user, $this->db_pwd);
if (video1 == "")
$sql = "UPDATE usernames SET video1 = '$Video' WHERE ref ='$ID'";
elseif (video2 == "")
$sql = "UPDATE usernames SET video2 = '$Video' WHERE ref ='$ID'";
$Result = mysql_query( $sql);
In the IF statement video1 and video2 are fields in my database, so what i was trying to do was,
IF video1 is blank then save it in that field, if its not blank check video2 to see if that is blank and save it there if it is.
Now my problem is, it always saves into video2, regardless if video1 is empty or not.
Any ideas why ?
is nobody able to help ?