10,940 Topics
| |
Hey guys, here is the table structure: Table name: globalsettings column names: setting, value, description An example query could be this: $query = "SELECT * FROM globalsettings WHERE setting = 'name'"; Okay, so here is what I am trying to do (I am using PDO for DB activity, but just … | |
Hello Community, I was wondering if there is a way to limit users on how many database entries they can insert then once they have reached 100 (Max entried) entries it will delete old entries. So if the user has reached 100 entried and they try to insert another entry … | |
Hi All, I am a beginner in php and working on admin side of a small website. I have attached a PHP CKEDITOR to the admin page so that the admin may edit the pages text. Here, i am a bit confused about one thing and that is about how … | |
hi everyone im having issues with some results i need, basically i have a view page that needs to output results based on earnings per month. all results are collected and outputted in rows, is there anyway in php i can group all the results by the earning month instead … | |
[B]insert.php[/B] [CODE]<?php $dbun = "$_POST[dbun]"; $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("my_db", $con); $sql="INSERT INTO $dbun (sn, date, particular, dr, cr) VALUES ('$_POST[sn]','$_POST[date]','$_POST[ptr]','$_POST[dr]','$_POST[cr]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "1 record added"; mysql_close($con) ?> [/CODE] [B]DB name = my_db[/B] [B]user.php[/B] … | |
I need to store the values of a textarea tag using a form to submit the value and finally store to a mysql database table. Here is what I have, I am sure its something dumb, but its been a while since I have used php. [CODE] <?php if(isset($_POST['submit'])){ $con … | |
hi, i am new to mysql and also to php, i am trying to add a feature to a webpage, for showing some latest records from a mysql databse. i managed to show records from mysql database, but the problem is i only trying to show the first four records … | |
Hi, I am trying to learn how to use a data base to store photos and such, I can now get info into the base and can get all the records to display , this is not what I had planed, So that lead me on a surch for answers … | |
Hi, In Virtual Box I've installed Fedora 17 and setup LAMP development environment. I've set the static ip to access the localhost and the applicaions/projects. Now I would like to configure it as to access them using the static IP from the host machine (Windows 7 OS). How can I … | |
Hi there, This question relates to data structures, performance and approach to a problem. It is best explained with example so bear with me. For the record, I will be using a combination of PHP, MySQL and Apache server on a dedicated Linux server. The problem is how we would … | |
| Hi folks. I'm developing a MySQL database driven, PHP web application that will be used by the general public and I'm starting to get a bit paranoid about database security. While creating the site I was using a single, full privileges database user to connect on each page that required … |
Hello, I need to know what's the best way to search tables with million records. I have a table called <people> and this table has the column: <status> Status might be more than one word like: "I am happy today and the weather is nice". Also, it might be in … | |
Alright guys I need some assistance with this. Ok In a few days I will start my project but I need to how to do something, Read Below: I need to find out how to display a Users specific table within My MySQL database for example here is a picture … | |
My code: <?php include("db.php"); if (isset($_POST['username']) && isset($_POST['password']) && isset($_POST['email'])) //Prevent SQL injections $username = mysql_real_escape_string($_POST['username']); $email = mysql_real_escape_string($_POST['email']); //Get MD5 hash of password $password = md5($_POST['password']); //Check to see if username exists $sql = mysql_query("SELECT username FROM usersystem WHERE username = '".$username."'"); if (mysql_num_rows($sql)>0) { die ("Username taken."); } … | |
windows xp was crashed, so after formatting & installation of windows I installed (overwrite of all existing files) **XAMPP** which was on different drive, other than **C:\**. As it was not lost when windows was crashed, I just overwrite the all files, this had happened with me lot of time … | |
Hello I have these database countries ->country_id ->country_name ->language counties ->county_id ->county_name ->language towns ->town_id ->town_name ->language locations ->location_id ->location_name ->language streets ->street_id ->street_name ->language and i have users that select country,county,town,location and optional street at a selected language and i want to show the show the informations of address … | |
I have code to upload a image to a folder (storing location and image info in a mysql database) with a separate page to display the images in albums on a website. Can I change this existing code to allow me to upload multiple images at once? here is the … | |
<?php $username = $_SESSION['username']; $result = 'sample'; $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } $sql = "Select FirstName from Person Where LoginID = (Select LoginID from UserLogin Where Username = '$username')"; $result = mysql_query($sql,$con); echo $result; ?> I'm kinda new to this server-side scripting … | |
could you please help me we're doing our independent study about visual c# 2008 could please teach ne how to connect mysql to C#? thanks for the help:) | |
This is a school project which I am a bit lost on. I have two tables with a relationship between course +-------------+----------------+ |id(primary) |coursename | +-------------+----------------+ enrolled +-------------+----------------+----------------+ |id(primary) |studentName |courseid(FK_from| | | |course.id) | +-------------+----------------+----------------+ I can insert a new course into the course table using the INSERT syntax … | |
I've just run into a problem, when pulling location data using a link table. There can be two entries in the link table, like so: item_id | contentent | country | state ------------------------------------- 123 | 1 | 2 | 20 123 | 1 | 2 | 21 When I echo … | |
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 … | |
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 … | |
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 … | |
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. … | |
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" … | |
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" … | |
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 | |
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', … |
The End.