rileypetty
Programmer
I'm attempting to rewrite all my asp/mssql in php/mysql and I have a problem with continuing the select statement string on a separate/second line.
In asp my Select statement would look partially like this -
strSQL = "SELECT books.recid AS recid, books.date_created AS cdate, "
strSQL = strSQL & "books.au_fname AS fname, books.au_mname AS mname, "
strSQL = strSQL & "books.au_lname AS lname, books.title AS title "
and it worked just fine but in mySQl/php I cannot get the darn thing to work. It works fine when I keep the select statement line to a single line but when I go to a second line...well. I've tried different combinations of syntax but no luck.
My working mysql/php looks like this - $sql = "select blog-recid as recid, picdesc as pdesc from blogpic order by blog-recid; "
I would like it to look like this ----
$sql = "SELECT blog_recid as recid, picdesc as pdesc, picowner as powner; "
"FROM blogpic; "
"ORDER BY blog_recid; "
I would appreciate any help someone may be willing to give me. Riley
In asp my Select statement would look partially like this -
strSQL = "SELECT books.recid AS recid, books.date_created AS cdate, "
strSQL = strSQL & "books.au_fname AS fname, books.au_mname AS mname, "
strSQL = strSQL & "books.au_lname AS lname, books.title AS title "
and it worked just fine but in mySQl/php I cannot get the darn thing to work. It works fine when I keep the select statement line to a single line but when I go to a second line...well. I've tried different combinations of syntax but no luck.
My working mysql/php looks like this - $sql = "select blog-recid as recid, picdesc as pdesc from blogpic order by blog-recid; "
I would like it to look like this ----
$sql = "SELECT blog_recid as recid, picdesc as pdesc, picowner as powner; "
"FROM blogpic; "
"ORDER BY blog_recid; "
I would appreciate any help someone may be willing to give me. Riley