-
Posts
812 -
Joined
-
Last visited
Everything posted by techker
-
i just want a script that could look in to my DB every 20min and count the rows of in a table then display it .. like in facebook on top were there is messages
-
Hey guys what should i look for in a script to make a small script that gets the DB information and shows notifications? like messages(3) members(23) ..... i know count rows can do it.i think?
-
hey guys i have this echo (empty($info['ID_Etudiant'])? "No image": "<img src=Etudiants/".$info['photo'] ." border=0 width=100>"); the echo pic if thee is one in database works.but if there is no pic in database it shows nothing?
-
see the attached..this is my menu. [attachment deleted by admin]
-
Hey guys i have a php page with a icon navigation. im looking for a type of ajax tabs that loads content on the same page..but all the scripts i find have <li> since im using images as a navigation i cant use <lil> is there a way? exp. <li class="nav-one"><a href="#featured" class="current">Featured</a></li> <li class="nav-two"><a href="#core">Core</a></li> <li class="nav-three"><a href="#jquerytuts">jQuery</a></li> <li class="nav-four last"><a href="#classics">Classics</a></li> but i have <tr> <td rowspan="17"> <img src="images/01MainFR_24.gif" width="15" height="1116" alt=""></td> <td colspan="5"> <img src="images/01MainFR_25.gif" width="237" height="41" alt=""></td> <td rowspan="16"> <img src="images/01MainFR_26.gif" width="16" height="1075" alt=""></td> <td colspan="19"> <img src="images/01MainFR_27.gif" width="724" height="41" alt=""></td> <td rowspan="16"> <img src="images/01MainFR_28.gif" width="8" height="1075" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="41" alt=""></td> </tr>
-
Hey guys im installing an x-cart module for my buddy and in the install doc it says 3b. In include/product_modify.php, add: /* BCSE Begin - Advanced Filter module */ if($active_modules['Advanced_Filter']){ include $xcart_dir."/modules/Advanced_Filter/product_modify_get_fields.php"; } /* BCSE End */ Before the last instance of: whats this? if (empty($product_info)) { this is the lines.. if (empty($product_info)) { if ($login_type == 'A') { $providers = func_query("SELECT id, login, title, firstname, lastname FROM $sql_tbl[customers] WHERE usertype='P' ORDER BY login, lastname, firstname"); if (!empty($providers)) { $smarty->assign('providers', $providers); } else { $top_message['content'] = func_get_langvar_by_name('msg_adm_warn_no_providers'); $top_message['type'] = 'W'; $smarty->assign('top_message', $top_message); $top_message = ''; $section = 'error'; /* BCSE Begin - Advanced Filter module */ if($active_modules['Advanced_Filter']){ include $xcart_dir."/modules/Advanced_Filter/product_modify_get_fields.php"; } /* BCSE End */ } } else { $product_owner = $logged_userid; } } else { $product_owner = addslashes($product_info['provider']); } if (!empty($product_owner)) { $provider_info = func_query_first("SELECT id, login, title, firstname, lastname FROM $sql_tbl[customers] WHERE id='$product_owner' AND usertype IN ('P','A')"); $smarty->assign('provider_info', $provider_info); } $gdlib_enabled = func_check_gd(); $generate_thumbnail = ''; if ($REQUEST_METHOD == 'POST') {
-
so i can understand the inner join will only join the both databse with the same info and not bother the other information?
-
ok so this a select..i need update? EDIT..i mest up wrong file.. this is my query to update the prices.. $sql4 = "UPDATE xcart_pricing p LEFT JOIN TbItemInventory pp ON p.productid = pp.XcartID SET p.price = pp.SalesPrice WHERE p.membershipid = 1 "; $retval4 = mysql_query( $sql4 ); if(! $retval4 ) { die('Could not update data: ' . mysql_error()); } ////6 $sql5 = "UPDATE xcart_pricing p LEFT JOIN TbItemInventory pp ON p.productid = pp.XcartID SET p.price = pp.SalesPrice2 WHERE p.membershipid = 5 ";
-
so this should update only the products selected and not put 0.00 on the others..
-
i don't see how i can make this in a inner join? SELECT * FROM TbItemInventory INNER JOIN xcart_pricing ON productid =XcartID;
-
no?but im shure it would to the same no?
-
Hey guys im updating a database every day with a script i did that check's a DB file and changes the prices in the pricing DB according to the file.. now the issue is when the product is not in the DB file it puts the prices at 0.00$ in the priciing DB.. is there a way to update all the products in the DB file and keep the others at the price it is already set in the pricing DB?? this is the query: $sql2 = "UPDATE xcart_pricing p LEFT JOIN TbItemInventory pp ON p.productid = pp.XcartID SET p.price = pp.SalesPrice2 WHERE p.productid = pp.XcartID"; $retval = mysql_query( $sql2 ); if(! $retval ) { die('Could not update data: ' . mysql_error()); } echo "Updated data successfully "; TblInventory is a OBDC file uploaded from an access DB file every night(DBSync for MS Access & MySQL really cool app converts access to mysql and uploads it.) the file is basically the POS system So it uploads to the DB then i compare the xcart pricing DB to the TBLInventory DB .. am i clear?lol
-
ok..i will figure it out..lol thx a bunch for the help!! is there any tutorials for this ?
-
well i select the brand but i want the id to search the database.no good?
-
look at this one http://x81.tech-design.ca/script/test_mp.php i added <? print_r ( $_POST["Product"]);?> <? print_r ( $_POST["Brand"]);?>
-
can i print in a input box the selected brand and product ? cause i get what your saying but it still does not stay loaded on the selected brand and product..
-
when i select brand it jumps to products but brand goes back to Brand instead of staying on the selected brand? maybe the link would help http://x81.tech-design.ca/script/test_m.php
-
oK so now it works i had another typo Products_Nneeded to be product_N echo ("<option value=\"$row[Product_id]\" " . ($Product_N == $row["Product_N"]? " selected" : "") . ">$row[Products_N but now it works but when i select the product it resets the form back to brand? i need to keep it selected..
-
<?php $Brand_N = $Product_N = null; //declare vars $conn = mysql_connect("localhost", "1", "2"); $db = mysql_select_db('3',$conn); if(isset($_POST["Brand"]) && is_numeric($_POST["Brand"])) { $Brand_N = $_POST["Brand"]; } if(isset($_POST["Product"]) && is_numeric($_POST["Product"])) { $Product_N = $_POST["Product"]; } ?> <script language="JavaScript"> function autoSubmit() { var formObject = document.forms['theForm']; formObject.submit(); } </script> <form name="theForm" method="post"> <select name="Brand" onChange="autoSubmit();"> <option value="Brand">Brand</option> <?php $sql = "SELECT * FROM Brand"; $Brand = mysql_query($sql,$conn); while($row = mysql_fetch_array($Brand)) { echo ("<option value=\"$row[brand_id]\" " . ($Brand_N == $row["Brand_N"]? " selected" : "") . ">$row[brand_N]</option>"); } ?> </select> <?php if($Brand_N!= null && is_numeric($Brand_N)) { ?> <select name="Product" onChange="autoSubmit();"> <option value="Product">Product</option> <?php $sql = "SELECT * FROM products WHERE Brand_id = $Brand_id "; $Products = mysql_query($sql,$conn); while($row = mysql_fetch_array($Products)) { echo ("<option value=\"$row[Product_id]\" " . ($Product_N == $row["Product_N"]? " selected" : "") . ">$row[Products_N]</option>"); } ?> </select> <?php } ?> </form> <? print_r ( $_POST );?>
-
ok i got your point..lol i changed it to uppercase like all of it.now it shows the second drop down but empty Array ( [brand] => 1 [Product] => Product )
-
typo error in the select box by default it is writen brand when i select a brand it just resets to brand
-
odd select box (Brand) Array ( [brand] => 1 )
-
ok so i changed it all to the select name..but still nothing?is there a way to echo the results so that i can see when i select a brand the output? if(isset($_POST["Brand"]) && is_numeric($_POST["Brand"])) { $Brand_N = $_POST["Brand"]; } if(isset($_POST["Product"]) && is_numeric($_POST["Product"])) { $Product_N = $_POST["Product"]; }
-
ok so im started to get it..lol if(isset($_POST["Brand_N"]) && is_numeric($_POST["Brand_N"])) { $Brand_N = $_POST["Brand"]; } if(isset($_POST["Product_N"]) && is_numeric($_POST["Product_N"])) { $Product_N = $_POST["Product"]; } so i need to change the product post to..
-
sorry im rusted out..i don't get it..brand is the db name. echo ("<option value=\"$row[brand_id]\" " . ($Brand_N == $row["Brand_id"]? " selected" : "") . ">$row[brand_N]</option>"); ???