Concatenating fields

From: Date: Wed, 24 Oct 2001 17:15:23 +0000
Subject: Concatenating fields
Groups: php.db 
Request: Send a blank email to php-db+get-13678@lists.php.net to get a copy of this message
I am using concat in my sql and it runs fine on mysql client. But when used in php it gives me an error: Supplied argument is not a valid MySQL result resource in <b>/var/www/html/scripts/cfg_code_delete.php</b> on line < $ssql="select concat(category, "-", code) as fill_column, code_id as submit_column from sys_code_tbl order by category"; echo "<OPTION selected value=\"\"></OPTION>"; $result = mysql_query($ssql); while ($row = mysql_fetch_array($result)) { echo "<OPTION value='".$row["submit_column"]."'>'".$row["fill_column"]."'</OPTION>"; } Help is appreciated. Regards, Harpreet Kaur Software Developer Crispin Corporations Inc.

« previous php.db (#13678) next »