10,940 Topics

Member Avatar for
Member Avatar for magicmarkuk

Hi I am running the following SQL (extract shown below) INSERT INTO users (user_id, username, username_clean) SELECT member_id, username, lower(REPLACE(username, '.', '_')) FROM members The problem arises when lower(REPLACE(username, '.', '_')) produces a duplicate that already exists in username_clean as the users table does not permit duplicates. Is there a …

Member Avatar for pritaeas
0
228
Member Avatar for phplover

Hi, I'm developing a blog that will have categories. I want to be able to store blog posts in more than one category. My problem is i am not sure how to go about it. I have a table called posts: CREATE TABLE `posts` ( `post_id` int(10) unsigned NOT NULL …

Member Avatar for phplover
0
182
Member Avatar for sicko

Hi guys, I'm doing an application that works with an online mysql database. Here is a sample of my code: ~~~ Dim adapter As New MySqlDataAdapter("select * from my_table order by code", "server=my_server;User Id=me;password=password;Persist Security Info=True;database=database") Dim my_table = New DataTable adapter.fillj(my_table) ~~~ On the last line, the application freezes …

Member Avatar for Mitja Bonca
0
122
Member Avatar for javedsai

Hi everyone, Now a days Justhost & Bluehost are putting restrictions on mysql joins. Even If there are 11 or 12 Joins the query is not running. When you will run the same query in phpmyadmin then, its giving you error message as "#1104 - The SELECT would examine more …

Member Avatar for veedeoo
0
73
Member Avatar for anand01

Hi all , I need to insert a value in to a table if that value does not exist more then twice , If once that value exist then it should insert only once .. could any one guide me.. thanks in advance

Member Avatar for fobos
0
133
Member Avatar for MDanz

Each childrow has a parentid and position. For childrows with the same position there is one row where start='1'. What i'm trying to do is return the pending rows with their start row. The results that should be shown are; start(owen) pending(dave,paul). This is because they have the same position. …

Member Avatar for rch1231
0
125
Member Avatar for Kennych

I need help making this mysql trigger. I'm creating this student enrollment project and the trigger I need needs to check that there is no course schedule conflicts when a student enrolls in course. Everytime a student enrolls in a class a row is added to the courses database. I …

0
98
Member Avatar for grant.baker

I have a page that I wrote to upload a text file to a mysql database. The text file has thousands of lines and each line is a separate database row. An identifier at the beginning of each line tells me which table to insert the line into in the …

Member Avatar for grant.baker
0
921
Member Avatar for danielsikes

Hi. I am trying to perform a "process of elimination" type of search using MySql. I have a table with a lot of values that people could search for- and currently if they search for 1 value it works great. But if they search for lets say "value1 value2" it …

Member Avatar for mehfooz
0
176
Member Avatar for Sonia11

Hello, Is there any way of restricting the values returned in MySql? For Example: There's a field in my table called points whihc I want to restrict from 0 to 17 only. This means the values more than 17 are unacceptable for field. Is there any way of implementing that? …

Member Avatar for smantscheff
0
85
Member Avatar for imti321

I HAVE MS ACCESS DATABASE OF 'STUDENTS' containing Their roll no's, names, min marks and max marks. As like schools publish results on their webistes, there is a text box in which roll no. is entered and the command button for searching the whole record of roll no. entered in …

Member Avatar for pritaeas
0
158
Member Avatar for mageshkk

Hi, Please help me... I am new to php and my sql. I need a code for uploading uploading the data from xls or xlsx file into my sql. Please give the code and help or send the code to futures.magesh@gmail.com..... Please help me.....

Member Avatar for rch1231
0
110
Member Avatar for breakzzzz20

Hey Guy's,anyone has a working codes of my problem? moving row data table to another table using php/mysql sorry guy's for this cause i'm very noob on this php/mysql language any help would be appreciated(i'm reallly badly need your help)

Member Avatar for vibhaJ
0
2K
Member Avatar for mohamedasif18

Hi all, i have a table like below Id Names 1 Sanjay, Anu, Rock 2 Mohamed, Asif, Selva, Manoj, Booker T 3 Jerrico, Cena 4 Amala How do i select MAX LENGTH OF STRING from column in the table, I need the result like, 2 Mohamed, Asif, Selva, Manoj, Booker …

Member Avatar for mohamedasif18
0
205
Member Avatar for joshmac

I have a singleton class that I am revamping and need a little help with. I want to use the following syntax for my queries without having to declare a global object. Below is my current code: /** * The db database object * * @access private * @var object …

0
181
Member Avatar for Dani

Sooo ... I learned during my schema migration that our webpages use UTF-8 encoding but our MySQL database (all InnoDB tables) uses latin1. After finally running some utf8_decode() php magic, I was finally able to successfully get all posts to display correctly again. However, now that I realize there's an …

Member Avatar for smantscheff
1
341
Member Avatar for ashhadiqbal

I m having this problem while executing search > Notice: Undefined variable: i in D:\xampp\htdocs\search.php on line 23 > > Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in D:\xampp\htdocs\search.php on line 35 . here is my source code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html …

Member Avatar for |-|x
0
233
Member Avatar for tubesnube

Hi, I was wondering could anyone help me here. In my program, the user selects a document and fill's it out, submits it and receives an email with the information they filled out in. What I am trying to do now is that when the user selects document and submits …

Member Avatar for cereal
0
140
Member Avatar for ashiiiish

i am unable to store data in database <?php include ("db_connect.php"); $res = mysql_query("SELECT * FROM posts"); while($data = mysql_fetch_array($res)) { $pid=$data['pid']; } echo $pid; $pid=$pid+1; //Get data in local variable $ptitle=$_POST['ptitle']; $uname=$_POST['uname']; $email=$_POST['email']; $pcont=$_POST['pcont']; if ($uname=="" or $ptitle=="" or $pcont=="" or $email=="") echo "All fields must be entered, hit …

Member Avatar for Biiim
0
90
Member Avatar for collinskawere

my script returns this error: Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\wamp\www\php_test\user_inter.php on line 17 <?php $db = mysql_connect("localhost"); mysql_select_db("room_p7", $db); $query = "select * from members"; $result = mysql_query($query); while($record=mysql_fetch_assoc($result)){ while(list($fieldname, $fieldvalue) = each($record)){ echo $fieldname.": <br>".$fieldvalue.":<br><br>"; } echo "<br><br>"; } ?>

Member Avatar for mohamedasif18
0
230
Member Avatar for mtho

Hi Guys Im kind of new to this and i hope i will explain myself enough for you to understand my question. I have a little dynamic blog. I have a form (called add_post.php)i use to insert my articles (blog_enrty). Unfortunately i get an error saying "you do not have …

Member Avatar for antonioazevedo
0
129
Member Avatar for ratazoit

#I need a php script that fetches a registered users info from the Mysql database and prints them on the page when a user visits his/hers profile page via a link showing his name, like facebook # * Heres the code that id like to show as the profile pag …

Member Avatar for Dani
0
702
Member Avatar for ostrados

Hi all, hey guys could you please help me in this issue: i get warning message whenever i try to run my login form Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in C:\xampp\htdocs\db.php on line 10 unable to connect to the database i am using xampp, …

Member Avatar for ostrados
0
994
Member Avatar for venkateshyeluri

I attempted to get the records from the MySQL database and display it on a Grid View but nothing appeared. The code is below: MySqlConnection myconn = new MySqlConnection("server=localhost;user id=root;password=db;database=workers;"); // myconn.Open(); string strSQL = "select * from details"; MySqlDataAdapter mydata = new MySqlDataAdapter(strSQL, myconn); MySqlCommandBuilder cBuilder = new MySqlCommandBuilder(mydata); …

Member Avatar for venkateshyeluri
0
191
Member Avatar for abhi10kumar

SELECT * FROM onlinepg as pg, pg_rooms as rooms WHERE pg.pg_id=rooms.pg_id and pg.status=0 AND ( rooms.roomtype='Sharing Basis' ) How I can write above query in PHP.. so that I can run successfully on mysql.

Member Avatar for abhi10kumar
0
177
Member Avatar for khurram.1987

#MySQL TABLES CRASHED BUT STILL WORKING WHEN RESTORED TO MySQL ON ANOTHER SYSTEM, WHY ???# Hi everyone, I'm a software developer and just started my professional career life, question here i want to ask is ... that few days ago i was at client site to resolve some issue in …

Member Avatar for khurram.1987
0
246
Member Avatar for anita.kcx

Hi, I have a database called my_db1 which contains 3 tables. Out of the 3 tables one table is being populated 24*7. My hosting provider (i.e godaddy) provides 25 Mysql databases 1 GB each. What should I do if the database exceeds the 1 GB size limit? Is there a …

Member Avatar for effectiveMySQL
0
2K
Member Avatar for cascer1

hello, i'm currently working on a website for my team fortress 2 server, and am now getting to the premium part. i would like to make a page where people select either a subscription or a one-time payment and then pay it. when the payment is done, they would be …

Member Avatar for Biiim
0
181
Member Avatar for outout1234

I am using mysql server 2012 and visual studio 2012 C#, i created a database and i can read the data from my database. The problem is that i cannot insert data into my database. Although the return value of the execution is 1, i dont see any changes in …

Member Avatar for Mitja Bonca
0
229
Member Avatar for ARKaMAN

Hi! I am just starting PHP. I am learning to sanitze my data. I found this exmaple from the web. It displays the sanitized data, but... it does not insert the sanitized data. :( What shouuld I do to make that happen? <?php $filters = array( "firstname" =>array("filter"=>FILTER_VALIDATE_INT, "flags"=>FILTER_FLAG_ARRAY|FILTER_NULL_ON_FAILURE, "options"=>array("min_range"=>0, …

Member Avatar for joshmac
0
128

The End.