i have piece of php code, works when placed on index page ( index.php ), nothing if put in page, i.e. add.php for example: having code add.php page, tried go to: www.myhost.com/add.php , nothing happen. if copy code index.php , go page www.myhost.com/index.php add row in sql table. why that? <?php $server="mysql.server.com"; $user="randomusr"; $pass="randompwd"; $db="randomdb"; $link=mysqli_connect($server, $user, $pass, $db); $result=mysqli_query($link,"select * `battery` `id`"); $query = "insert battery (id,type,owner,charge,time) values ('1','lily002','maisnow','15','2015-04-22 17:20:28')"; mysqli_query($link, $query); header("location: index.php"); //this 1 comment out when copied index.php ?> l # name type collation attributes null 1 id int(16) no ...
i have linkedlist private linkedlist<node> vertices; here class node public class node { string value; linkedlist edges ; public node() { value=null; edges=new linkedlist(); } } now linkedlist mentioned above contains nodes in graph.what want pass string value method .this method should check if nodes in linkedlist contains node has value equal value passed .if should return index of node. here tried do public node getnode(string value) { int index=vertices.indexof(value);//this problem is. //index getting assigned value -1 return vertices.get(index); } and called method way temp2=getnode(header[dest]); but call method vertices.indexof(value) returning -1 (-1 shows not have . although has node has value equal value passed) . how check nodes matches value value pass . vertices of type node , passing string value. in node need implement equals method indexof method of linkedlist us...
Comments
Post a Comment