hi,
i am using php with mySql server, pretty new to all the sql and i have a question: i have a query:
$book_copy_user = "SELECT * FROM copy_book " .
"JOIN copy_user_own " .
"ON copy_book.copy_id = copy_user_own.copy_id " .
"WHERE copy_user_own.user_id=1";
$res1 =mysql_query($sql1) or die (mysql_error());
which returns something like
[{"copy_id":"1","book_id":"1","user_id":"1"},
{"copy_id":"2","book_id":"2","user_id":"1"},
{"copy_id":"3","book_id":"3","user_id":"1"},
{"copy_id":"4","book_id":"4","user_id":"1"}]
i would like to do 3 different select on the result with a where clause, but when trying to so it tells me that there is more the one column.
my question is: is there a way that i can use the select result and apply select on it? if so how can i relate to the fields of the in the select result?
please provide code samples
thanks you all you are saints :)