naeembhatti
-
Posts
18 -
Joined
-
Last visited
Never
Posts posted by naeembhatti
-
-
no there are SP in mysql and they are perfect i used them in my application, i advise you to use them in future for best performance and your growth
-
hi friends h r u?
i use simple stored procedure e.g
in mysql=============================
CREATE PROCEDURE `test`.`users` (OUT returnval int)
BEGIN
set returnval = 100;
END //
how to get its value in php===================i am currently using this
$mysqli = new mysqli("localhost", "root", "bhatti", "test");
if (mysqli_connect_errno())
{
printf("Connection failed: %s\n", mysqli_connect_error());
exit();
}
$SQL = "CALL users(@retval)";
if (!$mysqli->real_query($SQL))
{
printf("Invalid query: %s\nWhole query: %s\n", $mysqli->error, $SQL);
exit();
}
if ($result = $mysqli->store_result())
{
while ($myrow = $result->fetch_array(MYSQLI_ASSOC))
{
print_r($myrow);
}
$result->close();
}
$mysqli->close();
=======================================
but when i wrote in phpmyadmin like CALL users(@retval); SELECT @retval; it returns me value but how to get it in php? -
hi friends h r u? i am new in stored procedures in mysql
plz can any body help me
i need an example in which i can create simple stored procedure for select or insert records and how can i get these things in php?
please help me out plz give me a brief example. -
try to use this [code]fopen("/home/rasmus/file.gif", "wb");[/code]
-
[code]
<input type=checkbox name=list[] value=1>
<input type=checkbox name=list[] value=6>
<input type=checkbox name=list[] value=4>
<input type=checkbox name=list[] value=13>
<input type=checkbox name=list[] value=19>
make it an array.
<?
just print the array.
for($i=0; $i< count($_REQUEST['list']); $i++)
{
echo $_REQUEST['list'][$i];
}
?>
[/code] -
wawooo thank u very much it works very fine but i was not 100% sure that what is happening lol.
now i got it thanks u once agin. -
will u plz explain me a very brief description of ur solution
thanx artacus. -
thax very much artacus.
it is looking easy now but it was looking very difficult to me.
-
hi guys how are u i am in trouble plz help me, my prob is.
i have 3 arrays
A = Array ( [0] => 2 [1] => 1 [2] => 3 [3] => 4 [4] => 5 [5] => 7 [6] => 6 )
B= Array ( [0] => http://localhost/script/images/children/img1.jpg [1] => http://localhost/script/images/children/img3.jpg [2] => http://localhost/script/images/children/img2.jpg [3] => http://localhost/script/images/children/img4.jpg [4] => http://localhost/script/images/children/img10.jpg [5] => http://localhost/script/images/children/img10.jpg [6] => http://localhost/script/images/children/img10.jpg )
C= Array ( [0] => http://localhost/script/01 [1] => http://localhost/script/03 [2] => http://localhost/script/! [3] => http://localhost/script/04 [4] => http://localhost/script/10 [5] => http://localhost/script/a [6] => http://localhost/script/description )
======================
array(A)-> defines the sort order
array(B)-> should be as sort order of array(A)
array(C)-> should be as sort order of array(A)
actually array(A) is a main array which contains the sort order like in [0]=>2 , [1]=>1
i want so make a single array having sort order of array(A)
like if array(A) have its 1st element to 2 then i want to pick 2nd element from array(B) and from array(C)
i want to make a double dimension array -
okey but if i want to get only text in a body which contains bold tag e.g
<b>Hello World</b>
Or
<b class='something'>Hello World</b>
Or
<b><span class='somthing'>Hello World</span></b>
anyother text contains bold or having strong tag
i want to search for only this please tell me how and also please help me where i can found more detail about RegExp();
thanks a lot.
-
please can give me a example?
-
how can i search for html body for text in <p>hi h r u?</p> tags or in <b>hello world</b>
e.g
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
aaaaa<p>hi h r u?</p>bbbbbbbbbbbbbb<b>hello world</b>ccccccc
</body>
</html>
i need only "hello world" or "hi h r u?"
please help me -
yes you are right this is exact my problem is actually
i need to fetch all the images from that link (bookmarklet feature as kaboodle.com) and a title from that link without posting any thing, possible?
-
actually i did not want that this site redirect to other page
i need to get the contents of current page having same variables
i use this as u recommend me.
<?php
// create a new CURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://www.canadiantire.ca/assortments/product_detail.jsp?FOLDER%3C%3Efolder_id=1408474396669883&ASSORTMENT%3C%3East_id=1408474396670271&bmUID=1159850265943&PRODUCT%3C%3Eprd_id=845524441896143&assortment=primary&fromSearch=true");
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
// grab URL and pass it to the browser
echo curl_exec($ch);
// close CURL resource, and free up system resources
curl_close($ch);
?>
thank u for help. -
please have a look here
http://www.dealarmy.com/curl/
i wrote a code provided by u and it is returning me a same error?
i want to get all the images from this site like bookmarklet? -
okey right, thank for the solution.
please can u tell me a little bit more about curl how can i use it or how can i access a socket of any site and is it installed on web server or i have to do?
where from download it? -
this is my example code.
[code]<?php
$fp = fsockopen("www.canadiantire.ca", 200, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
$out = "GET / HTTP/1.1\r\n";
$out .= "Host: http://www.canadiantire.ca/assortments/product_detail.jsp?FOLDER%3C%3Efolder_id=1408474396669883&ASSORTMENT%3C%3East_id=1408474396670271&bmUID=1159779949708&PRODUCT%3C%3Eprd_id=845524441896143&assortment=primary&fromSearch=true
\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}
?>[/code]
this function works for all sites but when ever i use this function for canadiantire.ca it generates this error
"
HTTP/1.0 302 Found Server: CacheFlow-Proxy/1.0 Location:http://www.http.com/ Connection: close Content-Length: 90
Redirect
"
i don't know what could be its solution please help me out.
[nobbc][edited by a moderator kenrbnsn, to surround the code with [code][/code] tags][/nobbc]
how to create stored procedure in mysql and how to call it on php?
in MySQL Help
Posted
no, i used mysqli for it