Hello folks,
I m really new to oxwall social solutions.I made my site but wondering why a social site doesn't gave a search for users.
I tried to make one by using this sql string :
--------------------------------------------------------------------
SELECT *FROM `ow_base_question_data`WHERE `questionName` LIKE 'realname'AND `textValue` LIKE '%'
--------------------------------------------------------------------
The above string actually searches for real name value of a user form db and gives out results
//----------------------------------------------
Code used :
<form action="search.php" method="post">
<input type="text" name="searchfor" />
<input type="submit" />
</form>
//------------------------------
PHP used :----------------------
<?php
// Credentials
$dbhost = "host";
$dbname = "dbname";
$dbuser = "dbuser";
$dbpass = "pass";
// Connection
global $tutorial_db;
$tutorial_db = new mysqli();
$tutorial_db->connect($dbhost, $dbuser, $dbpass, $dbname);
$tutorial_db->set_charset("utf8");
// Check Connection
if ($tutorial_db->connect_errno) {
printf("Connect failed: %s\n", $tutorial_db->connect_error);
exit();
}
extract $_POST;
$query = 'SELECT *FROM `ow_base_question_data`WHERE `questionName` LIKE 'realname'AND `textValue` LIKE '%'"';
$results = mysql_query($query);
while($row=mysql_fetch_assoc($result)) {
print($row['companyname']);
print("<br />");
}
?>
//--------------------------------
But i returned a failure........Can someone guide me to make a plugin for this code??
Please help me out!!