-
Posts
244 -
Joined
-
Last visited
Posts posted by chintansshah
-
-
Please use password for third parameter in mysql_connect
correct one is $link = mysql_connect ('localhost', 'root','');
-
Please find detail function inputs and outputs on php.net website
-
Hey corbeeresearch,
date() first parameter is only format only. for more information go to http://php.net/manual/en/function.date.php
-
Please use below function before after uploading image for resize it. After resizing successfully, save thumb image in Database also.
function createthumb($name,$filename,$new_w,$new_h){ $system=explode('.',$name); if (preg_match('/jpg|jpeg/',$system[1])){ $src_img=imagecreatefromjpeg($name); } if (preg_match('/png/',$system[1])){ $src_img=imagecreatefrompng($name); }
-
It will give an output like
[0] =>array()
{
[id] => BSA
[year] => 2010
[block] =>array()
{
[0] => BSA1-A
[1] => BSA1-B
}
}
-
So, you want to search a string "<p>" in column?
-
then, you should use mysql_fetch_array() after excute your query.
like
$sql = mysql_query("SELECT * FROM country ORDER BY country_name ASC"); while($data = mysql_fetch_array($sql)) { echo 'Country Name - '.$data['country_name'].' Country id-'.$data['id'].'<br>'; } echo "</form>";
-
use CHAR_LENGTH() function
Query = "SELECT * FROM articles WHERE CHAR_LENGTH('<p>') = 2"
-
Find code
//I hope you connect with Mysql $sql = mysql_query("SELECT * FROM country ORDER BY country_name ASC"); echo "<form>"; while($data = mysql_fetch_array($sql)) { echo '<input name="country" type="checkbox" id="'.$data['country_name'].'" value="'.$data['country_name'].'"> <label for="'.$data['country_name'].'">'.$data['country_name'].'</label>'; } echo "</form>";
Please let me know if you have any error.
-
How you make join between games and gamesplayers?
I haven't see in ON clause.
-
use mysql_num_rows() for number of record in recordset.
-
Use the same query which you have written. After getting result use club array function.
function club_array($contents,$parent_id)
{
if(count($contents)>0)
{
$list = array();
$children = array();
foreach ($contents as $v )
{
$pt = $v[$parent_id];
@$list = $children[$pt] ? $children[$pt] : array();
array_push( $list, $v );
$children[$pt] = $list;
}
$contents = $children;
}
return $contents;
}
-
Using inheritance you can avoid such situation,
or you can make your method public access...
-
open account in www.socialtwist.com
and use widget and copy script to html page of your website.
-
Anup, Which framework are you using?
-
when I php file from command prompt, I get error"Fatal error: DB Error: extension not found", find code here.
require_once(BASEDIR."/cfg/config.inc"); set_include_path(BASEDIR."/lib:" .BASEDIR."/lib/class:" . get_include_path()); require_once(BASEDIR."/lib/class/DB.php"); require_once(BASEDIR."/lib/class/DB/Query.php"); $_DB = DB::connect("mysql://" . $_CONFIG['DB']['username'] . (!empty($_CONFIG['DB']['password']) ? ":" . $_CONFIG['DB']['password'] : "") . "@" . (!empty($_CONFIG['DB']['server']) ? $_CONFIG['DB']['server'] : "localhost") . "/" . $_CONFIG['DB']['database'] , array('debug' => 2, 'portability' => DB_PORTABILITY_ALL)); if (PEAR::isError($_DB)) trigger_error($_DB->getMessage(), E_USER_ERROR); DB_Query::setDefaultConnection($_DB);
-
Parag, I think, you should club links into dropdown menu.
-
before save file on server and insert value in database, just change the file name, Search space and replace with underscore(_) sign.
-
I think, you have integrate wordpress.. am i right?
-
I can't do, I got below message.
[attachment deleted by admin]
-
Integrate with Social media like facebook, orkut, twitter etc...
-
I don't understand your requirement 100% but I tried.
You should create three different forms, one for Country, State and City.
in Country form, Name field is there
in State form, select country first and then add state name
in City form, first selct country, respected state as per country selection and then enter city details.
-
hey, nice pic, very cute
%20 because of while uploading a file, there is space "pics of-cute-girls.jpg" in file name
So, space is converts to %20
-
you can do with div, apply different background to both div
How to create a PHP form that assigns users MYSQL privileges and permissions
in PHP Coding Help
Posted
Can you please explain in detail, can you post your code, have you tried any mysql functions in php?
boss, it's very risky to give grant permission from php?