manuraj.dhanda
New Member
- Messages
- 21
- Reaction score
- 0
- Points
- 1
Hii Guyz..
Am new to PHP world. I want to use PHP on my server side to talk to db and return the results.
So, instead of taking a tutorial for PHP, am straight in here. Although I have read that w3schools tutorial.
I want to do a select query with placeholders as follows:
public function getLoginInfo(InfoVO $vo)
{
$_email = $vo->email;;
$_info = $vo->info;
$link = mysql_connect("localhost", "xxxx", "yyyyy");
mysql_select_db('mydb', $link);
$result = mysql_query("SELECT * FROM tbl_info where email='%s' and info='%s'",array($_email,$_info)) or die("Invalid query: " . mysql_error());
mysql_close($link);
return $result;
}
Can someone here help me to correct this query??
Thanks.
Am new to PHP world. I want to use PHP on my server side to talk to db and return the results.
So, instead of taking a tutorial for PHP, am straight in here. Although I have read that w3schools tutorial.
I want to do a select query with placeholders as follows:
public function getLoginInfo(InfoVO $vo)
{
$_email = $vo->email;;
$_info = $vo->info;
$link = mysql_connect("localhost", "xxxx", "yyyyy");
mysql_select_db('mydb', $link);
$result = mysql_query("SELECT * FROM tbl_info where email='%s' and info='%s'",array($_email,$_info)) or die("Invalid query: " . mysql_error());
mysql_close($link);
return $result;
}
Can someone here help me to correct this query??
Thanks.