10,940 Topics

Member Avatar for
Member Avatar for carebear23

Hi I am having trouble trying to normalise my tables, I would really appreciate some help! So far I have: [B][U]Customer Table[/U][/B] CustId(pk) Cust Name Cust Address Cust Postcode Cust Email [B][U]Order Table [/U][/B] OrderID (pk) Order Date_Time CustID(fk) [B][U]OrderDetails[/U][/B] DetailsID(pk) Quantity OrderNo(fk) DeliveryID(fk) [B][U]Product[/U][/B] ProductID(pk) ProductType ProductDescription DetailsID(fk) PartID(fk) …

Member Avatar for Web Dev Rob
0
123
Member Avatar for ruchit

<?php $connect=mysql_connect("localhost","root","") or die(mysql_error()."Cannot find Database"); mysql_select_db("cubicle",$connect); $insert_query='insert into registry(username,password,firstname,lastname,eid) values ("'.$_POST['uname']'","'.$_POST['pass']'","'.$_POST['fname']'","'.$_POST['lname']'","'.$_POST['email']'")'; mysql_query($insert_query); ?>

Member Avatar for pritaeas
0
75
Member Avatar for webteam

Hi, I'm putting an autocomplete textbox on my website to help users type in a location. I want users to be able to type a city or just a state (ex. Seattle, WA or Washington) kind of like what you see on Indeed ([url]http://www.indeed.com[/url]). How do I get the states …

Member Avatar for jlego
0
418
Member Avatar for terabyte

I haven't used MySQL for a long time and I forgot a lot, I'm developing a script that saves a list of URL's but I have a lot of doubts.. should I use varchar or text? (what is the difference) Which characters should I escape? what should be the length? …

Member Avatar for smantscheff
0
111
Member Avatar for VanHackman

Hello, I need some help. I have a MySql DB, and some fields have Japanese values. DB collate is set to: utf8_general_ci When I check for a specific register with PhpMyAdmin, values with japanese characters display ok, but when I try to get the same register to show it using …

Member Avatar for smantscheff
0
2K
Member Avatar for Brianbc

[CODE]<?php /* +-----------------+------------------------------------------------------------+ | Class | setup | | Author | Brian Onang'o | | Version | 1.0 | | Last Modified | 10:16 AM 10/2/2010 GMT+3 | +-----------------+------------------------------------------------------------+ | This program is free software; you can redistribute it and/or | | modify it under the terms of the GNU …

Member Avatar for Brianbc
0
238
Member Avatar for Zolcos

This is on my Gentoo box. Recently, a MySQL upgrade seems to have broken my UDFs, specifically those in lib_mysqludf_preg. I first noticed errors like: FUNCTION tablename.PREG_RLIKE does not exist I figured, OK, I must have to reinstall them. I try the config command for lib_mysqludf_preg and get this: ERROR …

Member Avatar for smantscheff
0
740
Member Avatar for ptara1

I'm trying to search a mysql table column for a number. However when I enter a number into the search form I get told that no query has been entered. Here is my code. Database connection information left out on purpose. [CODE] <?php if(isset($_POST['submit'])){ if(isset($_GET['go'])){ if(preg_match("/^[ a-zA-Z]+/", $_POST['search'])){ $search=$_POST['search']; $db=mysql_connect …

Member Avatar for smantscheff
0
76
Member Avatar for TheIdiot

I am wanting to create an online attendance sheet that would allow users to log on and use check boxes or option buttons for twelve weeks corresponding to wk1, wk2, wk3, etc... I have no problem retrieving the members of the group (records from db) but do not know how …

Member Avatar for shdwmage
0
123
Member Avatar for rajeesh_rsn

Hi Friends , I got a row in my table like follows date | Name | id -------------------------- 22-August | Ram | 15 14-July | Krish | 17 14_March | Anwar | 145 --------------------------- I want to sort this with date ie, 14-March 14-Jusy 22-August Using both date and month …

Member Avatar for d5e5
0
111
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
117
Member Avatar for Masks.be

Hi folks, I have used my connection for all my scripts, but when I am trying to INSERT the BIRTHDATE of a register user scripts i get the ERROR below: [CODE]Check for mysql_real_escape_string() support. if (function_exists('mysql_real_escape_string')) {global $dbc; // Need the connection. $data = mysql_real_escape_string (trim($date), $dbc); } else { …

Member Avatar for sudeepjd
0
59
Member Avatar for ditty

Hi i have a news table. I am using the query "select * from news_table where news_id in(8,3,6,1)". This query is working properly. But the problem is i need to return the rows in the same order what we give in the 'in' clause. ie, first record with news_id 8 …

Member Avatar for mahavir123
0
87
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
146
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
232
Member Avatar for tcollins412

i am writing code and i keep getting the error: mysql_fetch_array: supplied arguement is not a valid mysql resource. here is the code: [CODE] <?php include"dbconnect.php"; $item=$_POST['item']; $query3="SELECT * FROM selling WHERE name LIKE %item% AND state='$state' LIMIT 0,30"; $result3 = mysql_query($query3); while($item = mysql_fetch_array($result3)){ echo "<img src='$item[pic]' alt='pic'><a style='color: …

Member Avatar for ko ko
0
106
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
295

The End.