PravinS
-
Posts
459 -
Joined
-
Last visited
-
Days Won
2
Posts posted by PravinS
-
-
You can calculate total number of records in the table and then subtract 5 from it the your query will change as
$displayrecords = $totalrecords - 5; $sql = "SELECT * from TABLENAME LIMIT 6, $displayrecords ";
-
Try this
$sql = "SELECT * from TABLENAME LIMIT 6, 5";
it will give you next 5 records from 6 to 10
-
What are different ways for load balancing on MySQL server?
-
You need to check the queries, echo the queries and execute it in mysql.
-
Please check your mysql queries, also try this
$res = mysql_query("SELECT sqlhost,sqluser,sqlpass,chardb FROM realms WHERE entry='.$Realm.'"); and $res = mysql_query("SELECT guid FROM characters WHERE name='.$Name.'");
-
Use this function
function quote_smart($value) { // Stripslashes if (get_magic_quotes_gpc()) { $value = stripslashes($value); } // Quote if not a number or a numeric string if (!is_numeric($value)) { $value = "'" . mysql_real_escape_string($value) . "'"; } return $value; }
-
You can you date function with hour/minute/second as first parameter and the timestamp value as second parameter
-
You can also convert date into timestamp using mktime() function and use it in loop.
-
Alert the "result" and check what you are getting.
-
May this will help you, its a simple dynamic multilevel menu
https://sourceforge.net/projects/multilevelmenu/files/latest/
-
You mean to add text box to edit in combo box?
-
Also if you want to display any other text from table then you need to add field name in query and you drop down will be like this.
while ($row=mysql_fetch_array($result)) { echo '<option value="'.$row['supp_id'].'">'.$row['TXTFIELD'].'</option>\n'; }
check the TXTFIELD in drop down, just replace your field name there
-
Replace the while loop
while ($row=mysql_fetch_array($result)) { echo '<option value="'.$row['supp_id'].'">'.$row['supp_id'].'</option>\n'; }
-
Try 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; }
-
Give name to submit button and write your search code in isset of submit button.
<form method="get"> <input type="text" name="search" value="<?php echo $search; ?>"> <input type="submit" value="Search" name="btnSubmit"> </form>
<?php if (isset($_POST['btnSubmit'])) { //you search code } ?>
-
Use like this
<a href="#"><img src="" border="0"></a>
-
Ok, I have attached the zip file
[attachment deleted by admin]
-
You can download this simple PHP/MYSQL/JAVASCRIPT menu designed by me from below given link. It is freeware.
https://sourceforge.net/projects/multilevelmenu/files/latest/
-
If data type of the date field is DATE or DATETIME then you can use DATE_FORMAT(date,format) function in your select query.
-
You can use this function
function quote_smart($value) { // Stripslashes if (get_magic_quotes_gpc()) { $value = stripslashes($value); } // Quote if not a number or a numeric string if (!is_numeric($value)) { $value = "'" . mysql_real_escape_string($value) . "'"; } return $value; }
-
If the session variable "area" is blank then that option will be selected.
-
What PHP version you are using?
-
Check the % character, it should be in single quotes
$sql = SELECT * FROM articlessection where 1 and ArticlesSection_Name LIKE '%ar%' and Language_ID =2 Order by ArticlesSection_Order ASC
-
May this will help you. It will give you complete folder path. You can explode it with "/" character and take the last value of array for current folder name.
$dir = dirname($_SERVER['REQUEST_URI']);
working with xml here....help please....
in PHP Coding Help
Posted
You can use strip_tags () function, if you want to remove HTML tags from doc.