Search Results

Search found 16 results on 1 pages for 'holicreature'.

Page 1/1 | 1 

  • How to use where condition for the for a selected column using subquery?

    - by Holicreature
    I have two columns as company and product. I use the following query to get the products matching particular string... select id,(select name from company where product.cid=company.id) as company,name,selling_price,mrp from product where name like '$qry_string%' But when i need to list products of specific company how can i do? i tried the following but in vein select id,(select name from company where product.cid=company.id) as company,name,selling_price,mrp from product where company like '$qry_string%' Help me

    Read the article

  • How to resolve "Could not convert JavaScript argument arg 0 [nsIDOMHTMLDivElement.appendChild]" erro

    - by Holicreature
    i have a json object returned from ajax and when i alert it, it is displayed correctly and i try to add those into a unordered list and add that to a place holder div, but throws the above error.. function handleResponse() { if(httpa.readyState == 4){ var response = httpa.responseText; //alert(response); if(response!='empty') { //alert(response); eval("prod="+response); var len = prod.length; var st = "<ul>"; for(var cnt=0;cnt<len;cnt++) { st = st + "<li onclick='set("+prod[cnt].id+")'>"+prod[cnt].name+"</li>"; } st = st + "</ul>"; } var tt = document.getElementById('holder1'); tt.appendChild(st); // i even tried **tt.appendChild(eval(st));** tt.style.display = 'block'; } }

    Read the article

  • How to display the dynamically created elements for some time?

    - by Holicreature
    i have some rows of data displayed in a table and on mouse over of each row i've list two buttons inside a div element and then display it for some time. And i've associated some functions to be called on clicking the buttons that are dynamically created and displayed elements.. So what i did was i wrote a function which will create elements dynamically and place them exactly where i wanted using styles. And i wrote another function which will remove these dynamically added elements. I called them on mouseover and mouseout events of the row. now when i move mouse out the row to click the button they get disappeared bcoz of my mouseout function. So how can i proceed this? And what is the perfect method to create these kind of stuffs?

    Read the article

  • file cretaed using exec could not be accessed immediately after creation?

    - by Holicreature
    HI I'm using exec in php to execute a command and it will create a .png file in a temp folder.. After creating that i'm trying to open that file and read contents and process them,, but i end up file could not read error.. I think the time taken by the exec to execute and create a file is the cause for the issue.. but i dont know how to fix it? i tried sleep() but it makes my script to run slow <?php error_reporting(E_ALL); extension_loaded('ffmpeg') or die('Error in loading ffmpeg'); //db connection codes $max_width = 120; $max_height = 72; $path ="/path/"; $qry="select id, input_file, output_file from videos where thumbnail='' or thumbnail is null;"; $res=mysql_query($qry); $cnt = 1; while($row = mysql_fetch_array($res,MYSQL_ASSOC)) { $outfile = $row[output_file]; $imgname = $cnt.".png"; $srcfile = "/path/".$outfile; echo "####$srcfile####"; exec("ffmpeg -i ".$srcfile." -r 1 -ss 00:00:05 -f image2 -s 120x72 ".$path.$imgname); $nname = "./temp/".$imgname; echo "nname===== $nname"; $fileo = fopen($nname,"rb"); if($fileo) { $imgData = addslashes(file_get_contents($nname)); .. ... .... } else echo "Could not open<br><br>"; $cnt = $cnt + 1: } ?>

    Read the article

  • How to customize the printing while using Window.print ?

    - by Holicreature
    i want to print a invoice and i use a print.css by media=print and when i change the current stylesheet to print.css i could able to view what i should be printing without the titles and content left aligned. But still while i'm printing there is space in the top and left and its taking up whole a4 sheet and also the whole width of the page.. But i've defined a body width of just 550 px. While i view to print preview, it takes the whole width instead of taking up 1/3 of the width.. My print.css is body { width:550px; height:450px; color:#000000; margin:0; padding:0; word-spacing:1.1pt; font-family : "Times New Roman", Times, serif; font-size : 10px; text-align:left; } a { visibility :hidden; display : none; } input{ display : none; } table { margin: 1px; text-align:left; } #list,#head,#cont,#fotter,#oth,#links,#name,li,ul,ol { display : none; } I'm printing through browser using window.print, so is there any special configuration i need to do...?

    Read the article

  • How to find the differences between the values of a specific column based on a key?

    - by Holicreature
    I've two tables as purchase_details and invoice_details and i want to store the inventory/stock of each product from the data of these two tables. structure of purchase_details. 'pid', 'int(10)' 'product_id', 'int(10)' 'quantity', 'float(8,2)' 'amount', 'float(12,2)' 'expiry_date', 'date' structure of purchase_details. 'invoice_id', 'int(10) unsigned' 'product_id', 'int(10) unsigned' 'quantity', 'float(10,2)' 'price', 'float(12,2)' i want to calculate the total quantity of remaining stock (quantity of sum of products from purchase_details - quantity of sum of products from invoice_details). Product_id is would be same for the two tables. how can i proceed?

    Read the article

  • Table is realigned after setting the display property to 'block'

    - by Holicreature
    I'm having a table and i have a row which is initially set to the display property of 'none' and i changing it to 'block' at some selection of value from my select box , at that point of time the row is not aligned properly. My two columns are set inside a single column of the above row? but when i change it again to 'none' all the other rows are aligned correctly..

    Read the article

  • Problem with unlink() in php!

    - by Holicreature
    I'm creating a temp image always named 1.png under specific folder and once i read the image_contents and process, i use unlink() to delete that specific image from that folder. But sometimes the image file is not deleted and the same image is file is read and processed. That script is working otherwise fine... There is no permission related issues , as the files are deleted sometimes... Will there be any issue when the script is repeatedly called and the image with the name is already present and not deleted etc.. ??? Please suggest me what would be the problem extension_loaded('ffmpeg'); $max_width = 120; $max_height = 72; $path ="/home/fff99/public_html/temp/"; ..... ..... $nname = "/home/friend99/public_html/temp/".$imgname; $fileo = fopen($nname,"rb"); if($fileo) { $imgData = addslashes(file_get_contents($nname)); .... ... .. } unlink('$nname');

    Read the article

  • How to return null value if the query has no corresponding value?

    - by Holicreature
    Hi i've a query select c.name as companyname, u.name,u.email,u.role,a.date from useraccount u, company c, audittrial a where u.status='active' and u.companyid=c.id and (u.companyid=a.companyID and a.activity like 'User activated%' and a.email=u.email) order by u.companyid desc limit 10 So if the following part doesnt't satisfy, (u.companyid=a.companyID and a.activity like 'User activated%' and a.email=u.email) no rows will be returned.. but i want to return the result of the following query select c.name as companyname, u.name,u.email,u.role,a.date from useraccount u, company c, audittrial a where u.status='active' and u.companyid=c.id order by u.companyid desc limit 10 but to add that, i should return the date if available and return null value if date is not available.. how can i do this?

    Read the article

  • How to get the duration of the video uploaded ?

    - by Holicreature
    i'm using ffmpeg to convert videos to desired formats and to generate the thumbnails.. I want to find the total duration of the video to display in the main page along with the thumbnails.. Can i use ffmpeg to find the duration when its being uploaded and store them on the database.? Is storing the duration in db is necessary or else is there any other method?

    Read the article

  • how to convert the string into json object?

    - by Holicreature
    I use the ajax which sends back a string.. I want to convert the responsetext into a json object to process. I tried eval and also , but doesn't works... Wht to do? My code is function handleResponse() { if(httpa.readyState == 4){ var response = httpa.responseText; if(response!='empty') { alert(response); var foo = eval('(' +strJSON+ ')'); alert (foo); } } } // response alerts [{"id":"1","name":"Pepsodent 100g","selling_price":"28.75"},{"id":"2","name":"Pepsodent 40g","selling_price":"18.90"},{"id":"3","name":"Pepsodent brush","selling_price":"19.50"}]

    Read the article

  • Error with connecting ftp through php ...

    - by Holicreature
    Hi, I'm trying to connect to my server using php script to upload some files... But it doesn't connect... I dont know what is the error... I'm sure that ftp is enable, i checked it through php_info() What may be the error... <?php error_reporting(E_ALL); $ftp_server = "server.com"; //address of ftp server (leave out ftp://) $ftp_user_name = "Username"; // Username $ftp_user_pass = "Password"; // Password $conn_id = ftp_connect($ftp_server); // set up basic connection $login_result = ftp_login($conn_id,$ftp_user_name,$ftp_user_pass); if ($login_result = ftp_login($conn_id,$ftp_user_name,$ftp_user_pass)) { echo "Connected as ,$ftp_user_name,$ftp_user_pass \n"; } else { echo "Couldn't connect \n"; } ..... ..... .... .... ftp_close($conn_id); // close the FTP stream ?>

    Read the article

1