10,940 Topics
| |
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) … | |
<?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); ?> | |
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 … | |
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? … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 { … | |
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 … | |
[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 … | |
| 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 … |
i want to update the info of the highlighted row | |
delete the highlighted row ADODC DATAGRID MYSQL | |
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 … | |
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 | |
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 … | |
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 … | |
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: … | |
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 … | |
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 … | |
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 … | |
how to add record into my database mysql | |
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 = … | |
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 … | |
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, … |
The End.