
PravinS
-
Posts
459 -
Joined
-
Last visited
-
Days Won
2
Posts posted by PravinS
-
-
how many records are you getting for your SELECT query in phpmyadmin
SELECT * FROM taranaki2
-
-
in this line
$con = mysql_connect("localhost","root","","taranaki");
what is "taranaki", is this database password?, if yes, then it should be 3rd parameter of mysql_connect
also echo your SELECT query and check it in phpmyadmin
-
-
check this sample CSS and HTML
#maindiv { width:500px; background-color:#000; height:100px; padding:3px; } #leftdiv { width:250px; background-color:red; float:left; height:100px; } #rightdiv { width:250px; background-color:#fff; float:right; height:100px; }
<div id="maindiv"> <div id="leftdiv"></div> <div id="rightdiv"></div> </div>
-
you are mixing mysqli and mysql functions
if you use "mysql_connect" then you need to use "mysql_select_db" to connect the database
-
check your SQL queries, also use only mysql or mysqli
-
search this line
while($linhaRetorno == mysql_fetch_array($qrRetorno))
you have used "==" instead of "="
-
try using this
div.scroll { width:405px; max-height:550px; overflow-y:auto; overflow-x:hidden; }
it will work as, its maximum height is 550 and after that vertical scroll bar will come
-
try this
<?php print $_SESSION[$question_ids[$_SESSION['question_pointer']]; ?>
-
use TUNCATE tablename
or you can just export database structure and restore back overwriting the old database
do take backup of your old database
-
you cannot compare dates in "Y-m-d" format, you need to convert it into timestamp format, use mktime() function
-
try using GROUP BY clause like this
SELECT course.courseTitle, COUNT(DISTINCT student.sex) FROM course, student WHERE student.sex = 'f' GROUP BY course.courseTitle
-
just add <br> tag in between
-
-
use MySQL replace function in query like this
UPDATE Pic SET Place_id = REPLACE(Place_id, '#', '')
also do take table backup before doing mass update
-
you have used underscore (_) in variable ($_txtstudentid) of SQL query and at top you have not used underscore
-
try using this function
function sort_array($array, $key, $order) { if ($order=="DESC") $or="arsort"; else $or="asort"; for ($i = 0; $i < sizeof($array); $i++) { $sort_values[$i] = $array[$i][$key]; } $or($sort_values); reset ($sort_values); while (list ($arr_key, $arr_val) = each ($sort_values)) { $sorted_arr[] = $array[$arr_key]; } return $sorted_arr; }
-
if you are not going to reload the page then you can use meta refresh tag in iframe source page
-
each form should have its own submit button and every form should have close tag
-
Try replacing while loop using below code
$i = 1; echo '<tr>'; while($row = $ret->fetchArray(SQLITE3_ASSOC) ) { echo '<td>' .$row['Domain'].'</td><td><input type="checkbox" name="a[]" value="n"></td>'; if ($i % 5 == 0) echo '</tr><tr>'; $i++; } echo '</tr>';
-
-
Thanks for your reply
-
Hi,
from few weeks I am getting "Sorry, no new content found." whenever I go to "View New Content" link
Warning: mysql_query() expects parameter 2 to be resource, object given in F:\xampp\htdocs\taranaki2.php on line 69
in PHP Coding Help
Posted
there is comma(,) before WHERE, remove it
echo $UpdateQuery = "UPDATE taranaki2 SET ID='$_POST[id]', Destinations='$_POST[destinations]', Difficulty='$_POST[difficulty]' WHERE ID='$_POST[hidden]' ";