7,368 Topics

Member Avatar for
Member Avatar for Acute

I have a column "etype" which stores enum('r', 'p'). So with each selection I want to extend the row number until the number of etype->'p' will reach some number, for instance 10. If I use LIMIT 10, the total number of rows will be 10, but there is no guarantee …

Member Avatar for smantscheff
0
116
Member Avatar for Ignatius88

[CODE] pstmt = conn.prepareStatement("INSERT INTO tableA (userid, itemid) VALUES (?, ?) ON DUPLICATE KEY UPDATE value = ?"); pstmt.setString(1, userid); pstmt.setString(2, itemid); pstmt.setString(3, value); pstmt.executeUpdate(); [/CODE] This code works [CODE] pstmt = conn.prepareStatement("INSERT INTO tableA (userid, itemid) VALUES ((SELECT userid FROM user WHERE userid = ?), ?) ON DUPLICATE KEY …

Member Avatar for smantscheff
0
3K
Member Avatar for jward50

Hi I wonder if anyone can help I have a query SELECT b.name,c.name FROM directory_organisation_area_of_interest a, directory_organisation b, directory_areaofinterest c where b.id = a.organisation_id and a.areaofinterest_id = c.id which returns multiple rows per organisation however I would like to be able to have one row per org with multiple colums …

Member Avatar for smantscheff
0
59
Member Avatar for Shodow
Member Avatar for Shodow
Member Avatar for MagicMedia

I'm creating a forum like this one and I need to display my topics by last post. I want to create it so that the topic gets bumped back to the top whenever someone adds a new reply, like most forums including this one. I have a timestamp on both …

Member Avatar for MagicMedia
0
132
Member Avatar for Acute

How to store both cyrillic and latin in MySQL and is there anything special that I should know to display cyrillic with PHP? (conversions etc.) Thnx in advance

Member Avatar for smantscheff
0
116
Member Avatar for rajeesh_rsn

Hi friends, My table structure as like this name | id | Roles ------------------------------- name1 | 1012 | Cleaning, Cooking name2 | 1013 | Cooking --------------------------------------------- I want to select all the repeating names ie, Want to display the name which coming more than 1 times in database. Please help …

Member Avatar for mwasif
0
70
Member Avatar for andrewliu

I have an [B]ajax-register.php[/B] [CODE]include("connection.php"); if($_POST) { //form data $fname = mysql_real_escape_string($_POST['fname']); $lname = mysql_real_escape_string($_POST['lname']); $password = md5(mysql_real_escape_string($_POST['password'])); $confimPass = md5(mysql_real_escape_string($_POST['confirmPass'])); $email = mysql_real_escape_string($_POST['email']); $confirmEmail = mysql_real_escape_string($_POST['confirmEmail']); $dob = mysql_real_escape_string($_POST['dob']); // database $queryreg = ("INSERT INTO users (fname,lname,password,email,dob) VALUES ('$fname','$lname','$password','$email','$dob'"); mysql_query($queryreg) or die(mysql_error()); }[/CODE] Then I have my [B]register.php[/B] with …

Member Avatar for johnsteve.bravo
0
231
Member Avatar for jakizak

I've seen over the last few days many people on the internet and various forums asking for how this is done. Now there is plenty of posts out there that explain how to do this. However I have yet to find one that explains how you work it into a …

Member Avatar for jakizak
0
158
Member Avatar for ziadkassam

I have a program for students in my school uses asp with mssql database with a small server in the school, and I want to make a website with php and mysql database, can I always update the queries by exporting the mssql to mysql? and how I can do …

Member Avatar for ziadkassam
0
203
Member Avatar for Shodow

when i try to add a record [CODE]Private Sub cmdDone_Click() Dim Rs As New ADODB.Recordset Set Rs = New ADODB.Recordset Call ServerConnect Rs.Open "SELECT * FROM list1", conn, adOpenStatic, adLockOptimistic Rs.AddNew Rs!CustomerName = txtName.Text Rs!ContactNumber = txtContact.Text Rs!Date = dt.Value Rs!TimeStart = cmbStart.Text Rs!TimeEnd = cmbEnd.Text Rs!Event = cmbEvent.Text Rs!Guest …

Member Avatar for AndreRet
0
195
Member Avatar for Shodow
Member Avatar for Shodow
Member Avatar for lifeworks

Hi Building an e-commerce store, got a product table, with a price field got a discounts table with product_id, and an active field my query left joins discounts onto products, but I only want to pull in the discount if discount.active = '1'... but if I use 'WHERE discount.active = …

Member Avatar for smantscheff
0
77
Member Avatar for Rotten Elf

Hopefully someone can help me. Explaining this may be a pain for ya, but I would really appreciate any assistance that you may be able to give me. Here is my scenario. -I am trying to import a csv file into phpmyadmin. -The MySQL database is for Wordpress. -The .csv …

Member Avatar for smantscheff
0
171
Member Avatar for UzuNarU

Ok what I am trying to do is submit changes. I have all the information being collected. I'm just having trouble with the proper query to run. I currently have: [CODE] $sql = "UPDATE anime_list SET anime_name = '$animename' rating = '$rating' episodes = '$episodes' WHERE id='$id'"; $result = mysqli_query($dbc, …

Member Avatar for UzuNarU
0
294
Member Avatar for Melanie22

Dear Friends, I am a web designer hence i only know very little of PHP programming. I need help on the PHP script for me to post data from other server to my server. Due to my lack of knowledge in PHP so i'm using JetForm.com as a third party …

Member Avatar for grayceworks
0
284
Member Avatar for devinodaniel

Hey friends, I have a page that I've been working on for HOURS and finally almost have it perfect except for TWO things: 1. Every time I load the page it automatically inserts a blank row of data into my MySQL database. (Submitting it after filling out the for works …

Member Avatar for diafol
0
6K
Member Avatar for newbiecoder

Hello I installed MYSQL and Apache via XAMPP. And I am trying some codes from a textbook while Apace and MYSQL are running. I am trying to connect MYSQL with this code :[CODE]<?php //connect to MySQL; note we’ve used our own parameters- you should use //your own for hostname, user, …

Member Avatar for diafol
0
202
Member Avatar for kvskchaitanya

Hello I've large data in a table in which one of the columns is description. in this column i'm to store description of materials and their tolerance which is a (+/-)ve value. for sample:18K 1/4W ±1%. while restoring the data on a test system i observed a special character before …

Member Avatar for kvskchaitanya
0
159
Member Avatar for fabzster

Hi I am using the following join query to get a list of stores that have sold policies during the day. But I need it to be distinct [CODE] $Query = mysql_query("SELECT tblpolicies.StoreId , tblpolicies.DateReceived , DailyGroup.GroupName , DailyGroup.StoreName , DailyGroup.PortfolioName FROM tblpolicies LEFT OUTER JOIN (SELECT StoreId , GroupName, …

Member Avatar for jlego
1
233
Member Avatar for tcollins412

i am writing something in php and i keep getting the error: mysql_fetch_array not a valid sql argument. here is the code: [CODE=php] <?php if ($_GET['goto']=='requests'){ ?> <table> <?php $query = "SELECT * FROM friends WHERE toid='$id'"; $result = mysql_query($query); while($row = mysql_fetch_array($result)){ $query = "SELECT * FROM members WHERE …

Member Avatar for mschroeder
0
91
Member Avatar for AMADH

Hello, I was wondering if someone could help me. I am new to mysql/php and I was wondering if there is a way that I can have php create pages for me. What I want is that I no longer need to create new page, so I will have a …

Member Avatar for pixelsoul
0
815
Member Avatar for scorpio222

I have a database, that has a type_code in it. There are 3 types of products and certain numbers and costs associated with each type. The type codes are not present in sequential order in the database. they are random and i have a csv file with only 2 columns …

Member Avatar for smantscheff
0
89
Member Avatar for peck3277

Hi guys, Does anyone know if it's possible to connect to the MYSQL database in wamp using C#. I basically want to take information from the COM port using C# and write it to the database. Any thoughts/tutorials/links would be greatly appreciated!

Member Avatar for griswolf
0
107
Member Avatar for debayanmitra

[CODE] DELIMITER $$ DROP PROCEDURE IF EXISTS `AddTranMast` $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `AddTranMast`(mDocDt date,mDocType CHAR(2)) begin declare mDocNo char(5); declare Code double; select max(docno) into Code from tranmast; if code=00000 then set mDocNo=00001; else set Code=(100000+Code+1); set mDocNo=substring(Code,2,5); end if; insert into tranmast(docno,docdt,doctype) values(mDocNo,mDocDt,mDocType); end $$ DELIMITER ; [/CODE] I …

Member Avatar for smantscheff
0
159
Member Avatar for UzuNarU

Hey everybody. So I am just trying to write a script to delete a row in a MySQL database. Unfortunately I seem to have something wrong...even though I don't get any errors. Here is a snippet of the code on the page to send the request: [CODE] echo "<tr><td width='138px' …

Member Avatar for UzuNarU
0
154
Member Avatar for holmiboii

Hallo daniweb!, Im new here *hehe* anyway I've been working on our companys website for a while now but I just cant get it to work... the error is @ the 26:th line. btw we're using: Cirtex hosting the defination "myusername" and "mypassword" is in the prev. .php file (main_login.php) …

Member Avatar for holmiboii
0
233
Member Avatar for indr

hi, i am getting a "no database selected error" when i give the following command.. mysql>source company_data.sql ERROR 1046 (3D000):No database selected pls help me out with this error!!

Member Avatar for d5e5
0
114

The End.