7,368 Topics

Member Avatar for
Member Avatar for Tunnleram

I know that I can limit a query by 10 for instance, and have the top rows returned, but I have a situation where I want to return all rows, but I want to be able to mark the rows that fall in the top 10 a certain way. For …

Member Avatar for Tunnleram
0
198
Member Avatar for kantigniter

Hi all, I'm new to codeigniter, and i want to know how to approach or a small example as to how to get the following: 1) If I have a form, and it has fields say asking for number of some category for example: first in a drop down we …

Member Avatar for diafol
0
251
Member Avatar for kantigniter

I have two forms the first one is as follows: ![5364b88b6acff4f96bf8734c448984c4](/attachments/large/4/5364b88b6acff4f96bf8734c448984c4.jpg "5364b88b6acff4f96bf8734c448984c4") In the first one, I enter the customer details and the type of house he wants, and the number of rooms he has, and I have set a session once I hit the next button. This is spanning …

Member Avatar for kantigniter
0
501
Member Avatar for PriteshP23

I had saved files in folder "uploads".I want to display uploaded filename in the table. There are two files. london.jpeg & usa.pdf Table: no Name File 1 abc london 2 xyz usa When one click on london or usa, one should able to see the file. I need urngent help. …

Member Avatar for PriteshP23
0
456
Member Avatar for MWEB

Hello everyone :) I have this lines of codes and i get : > Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in D:\xampp22\htdocs\folder\index.php on line 52 ( 19 in the code below ) <form method="POST" action="index.php"> CODE : <input type="text" placeholder="Type the code" name="searchfor" /> <input type="submit" …

Member Avatar for Jan_2
0
920
Member Avatar for mpc123

HI Have a field in database which has multiple of the same number in, I have got a query of which works with the field with 1 in but then want it to then go to ++ so if I limit 9 results they will show with this query for …

Member Avatar for pritaeas
0
142
Member Avatar for games1124u

Hello, i want to know if somebody could help me to make this script safe. Like how to put mysql_real_escape_string. Or how to use preg_split, or htmletities.... <?php include 'extern/connect.php'; $categories = file_get_contents('extern/categories.php'); $footer = file_get_contents('extern/footer.php'); $logo = file_get_contents('extern/logo.php'); $report = file_get_contents('extern/report.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" …

Member Avatar for pritaeas
0
376
Member Avatar for mpc123

Hi im trying to random showing items from data base and when echoed the same ones appear? If anyone could help that would be great. This is the query SELECT * FROM TABLE1, TABLE2 WHERE FIND_IN_SET(TABLE2.FIELD1, TABLE1.FIELD1) and `FIELDNAME` >= RAND() LIMIT 10

Member Avatar for pritaeas
0
146
Member Avatar for didi00

Hi guys, I'm trying to set a database for a shopping cart. Here is some of the code: [code] CREATE TABLE `tbl_cart` ( `ct_id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT , `pd_id` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0', `ct_qty` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '1', …

Member Avatar for Jan_2
0
1K
Member Avatar for Secretary

Importing a db table structure into a database using PHP MyAdmin the following table will not import. i can find no errors on the table, perhaps i am missing something. > > -- -------------------------------------------------------- > > > > -- > > -- Table structure for table `conversations` > > -- …

Member Avatar for Secretary
0
191
Member Avatar for garyjohnson

I have a query in php that has an offset in it. I want the offset value to be a variable but I am not sure how to do so. This is my query but it comes up as an error. $query = "SELECT * FROM comments WHERE `commenter_username` IN …

Member Avatar for diafol
0
181
Member Avatar for jemartalaban_1

hi, it is possible that one column in a row has a data ? and how to code it in vb6 if possible, please help example NAME: rasha bonquel Age : 20 SUbject : Math , English, Science Grades : 78, 78, 78 NAME | Age | Subject | Grade …

Member Avatar for pritaeas
0
220
Member Avatar for official.DJ.cabo

**I Get error like this when i start the host.** <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.watermarkinput.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".search").keyup(function() { var searchbox = $(this).val(); var dataString = 'searchword='+ searchbox; if(searchbox=='') { } else { $.ajax({ type: "POST", url: "search.php", data: dataString, cache: false, success: function(html) { $("#display").html(html).show(); } }); …

Member Avatar for dinhunzvi
0
337
Member Avatar for sanbhu2105

hi guys, i have 2 tables - tblproduct and tblretprod. i insert my product details to tbl product with prod_id being auto increment other fields are prod_name, prod_brand, prod_desc, prod_photo, cat, subcat i hv another table tblretprod with fields id, user_id, prod_id, prod_price i can add my products successfully i …

Member Avatar for sanbhu2105
0
324
Member Avatar for pritaeas

## Before You Ask ## - Engage your brain! We understand that running into a problem can turn off the rational centers of the brain, but please sit back and think for a bit about your problem before running off to find help. All too often a little common sense …

0
374
Member Avatar for garyjohnson

Hello, I have a mysql query $query = "SELECT * FROM comments WHERE commenter_username IN (" . join(',', $list) . ") Or Number IN (" . join(',', $list) . ") ORDER BY comment_id DESC"; I want the query to select one row, the row with the highest id. Then store …

Member Avatar for Atli
0
298
Member Avatar for sanbhu2105

hello, am new here and new to php/mysql coding. i have 2 tables - tbl_prodstd and tbl_products tbl_prodstd - std_id, prod_name, prod_desc, prod_photo, prod_brand tbl_product - prod_id, std_id, prod_name, prod_brand, prod_desc, prod_price, cat, subcat, prod_photo i created 3 pages - add_prod.php, addprod.php, func.php the func.php displays prod_name and prod_brand as …

Member Avatar for sanbhu2105
0
332
Member Avatar for sathish_nadu

I'm trying to set a query that will pull all clients whose birthday is today. I'm using phpmyadmin localhost via Unix socket, birthday is set as DATE. All I need returned is the firstname (emp.emp_firstname asfirst name) , lastname (emp.emp_lastname aslast name) and date of birth (emp_birthday as 'dob')

Member Avatar for pzuurveen
0
141
Member Avatar for kantigniter

I have a form as follows, and I have set the session on clicking next. Each type of house is with a different set of rooms. Say, if I click Independent, I get a list of rooms below. If I choose Villa/Duplex, a different set will pop out. In the …

Member Avatar for kantigniter
0
153
Member Avatar for PF2G

Hi, i'm doing a website where the user can add his favourite bands in his profile. But not every band is in the DB, so if the band isn't in the DB it adds the name in the column. this is what i have: if(mysql_query("INSERT INTO bandas_fav(band_fav_id_user, band_fav_id_banda) VALUES('".$_GET['iduser']."', '".$bands_name['banda_id']."')")) …

Member Avatar for minitauros
0
152
Member Avatar for sabarinadh.ch

I want to upload images to my database, these can be done using php and mysqli . The form contains some information like file descriptiopn and input file and when i submit the file the file will automatically enters in to the database and the image will be stored in …

Member Avatar for diafol
0
1K
Member Avatar for aynamohol

I have two tables named `stockin and stockout`. I can execute query easily separately for each table. Now, I want to bind both query in a table. Please check query and output below- query in stockin: select serialno, sum(in_quantity) SUMIN, group_concat(in_quantity) GCIN from stockin group by stockin.serialno output: +----------+-------+-------------+ | …

Member Avatar for pritaeas
0
3K
Member Avatar for kantigniter

![50e59f3e9c4e5d94efdbea6bc00b2e2c](/attachments/large/4/50e59f3e9c4e5d94efdbea6bc00b2e2c.jpg "50e59f3e9c4e5d94efdbea6bc00b2e2c") I have three tables, and I'm going to show the third table. What I want to know is how to delete each entry from it? As, the first and the second tables ids are fetched and inserted in the third one. As in, I have my model as …

Member Avatar for kantigniter
0
995
Member Avatar for Hazuan Nazri

Hello Friends!! I need some help here.... i build a website called E-Maintenance, now i need to make a form that user can choose date and the system will insert into database mysql after the user click submit, im searching on the internet and i found this Javascript calender, this …

Member Avatar for Hazuan Nazri
0
169
Member Avatar for mogaka

## Stored Procedure ## -- Procedure name: billing_to_invoice_update BEGIN UPDATE accounts.0_debtor_trans SET ov_amount=ov_amount+fee-oldfee WHERE trans_no=encounter AND branch_code=pid; UPDATE accounts.0_debtor_trans_details SET unit_price=fee/units,quantity=units,qty_done=units WHERE debtor_trans_no=encounter AND stock_id=CONCAT(code_type,'/',code); -- gl updates UPDATE accounts.0_gl_trans SET amount=ROUND((-1)*fee) WHERE account=code_type AND memo_=CONCAT(code_type,'/',code) AND last_service_encounter=encounter; UPDATE accounts.0_gl_trans SET amount=ROUND(fee) WHERE account=1100 AND memo_=CONCAT(code_type,'/',code) AND last_service_encounter=encounter; END BEGIN …

Member Avatar for SQLpower
0
129
Member Avatar for savedlema

Hi all! I'm stuck somewhere. I have a table for Inventory (which contains the available amount of each food component) What I want to do: If I select a certain food (say salad) I want to be able to deduct the components (amount) of 'salad' from the inventory table. Consider …

Member Avatar for tinstaafl
0
602
Member Avatar for savedlema

Hi all! I don't know if that was a good title, but; I have this query (I will call it query1): "SELECT InvID, quantity FROM Recipe WHERE MenuID = 1" In my tables, this will give me something like Water(20), Oil(30) Now, from this result of a SELECT query1 (i.e …

Member Avatar for savedlema
0
321
Member Avatar for Moderns

Hello, I want to make a conditional SQL. I have one table "users" and it has two columns (id, status) I need to search for users IDs based on their status. For example. Every 5 seconds I am querying from the database (by AJAX) as per the below description: Let …

Member Avatar for LastMitch
0
217
Member Avatar for careaa.fractal

Hi. I have HTML form and i need php code when i want to subtract something from coulmn in mysql database. Something like http://www.daniweb.com/web-development/php/threads/101739/using-php-and-html-forms-to-update-a-mysql-database MY FORM - HTML <form action="objednat_potvrdenie.php" method="post"> Meno: <input type="text" name="meno"><br> Priezvisko: <input type="text" name="prie"><br> Mesto: <input type="text" name="mesto"><br> Ulica: <input type="text" name="ulica"><br> PSČ: <input type="text" …

Member Avatar for Dani
0
563
Member Avatar for davidjennings

Hi All - I am trying create classes for db connection and I am getting the following error Thanks in advance D Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'XXXXXXX_david'@'localhost' (using password: YES) in /home/djenning/public_html/dbconnection/connection.php on line 20 Cannot connect to the database page: connection.php <?php class createConnection //create a …

Member Avatar for davidjennings
0
531

The End.