10,940 Topics
| |
I am beginner and this is my [B]first project[/B] (happy face). I am trying to make log in systen to learn php and mySQL. At first everything was working so and then i decided to rewrite everything in [B]Object oriented[/B] code and then it is not working. Since it is … | |
I just thought I would re-iterate something that I have mentioned a few times in my replies to threads on here in that if your code isn't working, one of the first things to do is actually test your query in the database (i.e. through phpMyAdmin). The reason I am … | |
dear all, [CODE]$member_id = $_POST['member_id']; $delete = 'yes'; $HOST = 'localhost'; $USERNAME = 'root'; $PASSWORD = ''; $DB = 'hrs'; $link = mysqli_connect($HOST, $USERNAME, $PASSWORD, $DB); $query = "UPDATE member SET delete='$delete' WHERE member_id='$member_id'"; echo $query; $result = mysqli_query($link, $query) or die(mysqli_error($link)); [/CODE] Any error in my query? it says … | |
Hi , I want to copy the selected fields, eg:SELECT * FROM table1 where flag='1'; to another table ,table2 can anyone plz help me | |
i have two tables [ICODE] Articles id bigint 20 unsigned pk autoinc date_modified datetime name varchar title varchar content text Tags id bigint 20 unsigned pk autoinc name varchar [/ICODE] and i want to create this third table from above two tables [ICODE] Articles_Tags article_id bigint 20 unsigned tag_id bigint … | |
Well, i am making a blog in which i have to show images and links in my every post.So i have to use <a> & <img> tags in my post. but I m also using htmlentities function for "post" string variable ( like this -- <?php echo htmlentities($post); ?> ) … | |
Hi everyone, I have made a script which logs the users ip into a table. Here is the table: [CODE] ID - PKEY A.INC IP - VARCHAR ENTERED - TIMESTAMP [/CODE] What I would like to happen is that after a row has been inserted, I want to set up … | |
Here is my code... [CODE]import java.sql.Connection; import java.sql.DriverManager; import java.sql.Statement; public class example1{ public static void main(String[] args) { try { Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","user","password"); Statement state = (Statement) con.createStatement(); String username = "John"; String password = "John1"; int experience = 0; int level = 1; String insert = "INSERT … | |
Hi guys, Used this forum a bit today to find answers for a bit of scripting that I'm attempting. It's been 5-6 years since I last did anything like this, so bear with me. My question is; why does this generate results from Dec 12 2011 and not from Dec … | |
Hi I am having trouble trying to connect to a local MySql db using the MySQL Connector/C++. I was able to successfully compile the bellow code but when I run it results in a Segmentation fault. I am trying to run this on a Windows XP machine using the g++ … | |
this is my code in which i am getting $_POST['name'] from a html form.i am using mysql_real_escape_string function that should escape characters like these [ICODE]\x00 \n \r \ ' " \x1a[/ICODE] but when i enter these special characters in the form .it is going in the database. it should be … | |
Hello, I am using this code and getting this error given below:- [B]Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\database login new\buyers_substance_view.php on line 46[/B] [B]Please check the code is given below:-[/B] [CODE][/CODE] <?php $title="Buyers Substance Report"; $page_name="Buyers Substance Report"; include("includes/header.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD … | |
Hey everyone! I am working on a project that involves querying a mysql database using php, and I am running into some issues. html form is in list_files.php and the query is in query.php .. i also attached my mySQL database which has 2 tables: only the file table is … | |
Hi Everyone- We are building a database that needs table(purchaser) to check table(paypal) for a matching telephone number. Table(paypal) has 'purchaser telephone' as PK and table(purchaser) has 'purchaser telephone' as FK. I can insert and see the data in both tables, but running a select query returns an empty result. … | |
can anybody give me query of current version of my sql of [CODE]$sql = "SELECT entries.*, catagories.cat FROM entries, catagories WHERE entries.cat_id = catagories.id ORDER BY dateposted DESC LIMIT 1;";[/CODE] i will be thankful. | |
Dear All, I got a standalone application where I update 3 db at one time. One on local db, one is central db and one more is the its exact copy of local db in the central server. So I have been using the normal begin and commit when there … | |
Hi All I am creating a program which will (in the end) help me quickly transfer products from one category into another within a MySQL Database. I have a database with TWO separate tables which are connected using INNER JOIN where the products have a categoryID as do the categories … | |
Hi there, I am real newbie in MySQL. I just installed My SQL workbench and created a table in workbennch. I am trying to open the MYSQL client to see if the script that I ran was successful and all I see this this command line window flash for a … | |
[CODE]<?php session_start(); $_SESSION['title'] = $_GET['form_book_title']; $_SESSION['ISBN'] = $_GET['form_book_ISBN']; $_SESSION['qty'] = $_GET['form_book_qty']; $_SESSION['fName'] = $_GET['form_book_fName']; $_SESSION['lName'] = $_GET['form_book_lName']; if($_SESSION['ISBN']=="" || $_SESSION['title']=="" || $_SESSION['qty'] =="" || $_SESSION['lName'] =="" || $_SESSION['fName'] =="") { echo "please fill out all the form fields"; echo "<a href=\"sell.html\"> Go Back"; }else require_once("db_info.php"); $con = mysql_connect($localhost,$username,$pw); if(!$con) exit(mysql_error()); … | |
A new version (9.0) of [URL="http://www.postgresql.org"]PostgreSQL[/URL] is in beta and ready for public testing. If version 9.0 lives up to its proposed [URL="http://www.postgresql.org/about/featurematrix"]feature list[/URL], then it is serious competition for MySQL. PostgreSQL proponents have long suggested that PostgreSQL has always enjoyed superiority over MySQL. I beg to differ but that … | |
I am trying to combine a MySQL query with change date format so all rows display as d-m-Y (surely possible ?) in results. The datefield type is DATE. [CODE]$query="SELECT * FROM table DATE_FORMAT('datefield','%d-%m-%Y')AS datefield FROM table";[/CODE] SELECT*FROM table on its own displays datefield as YYYY-MM-DD but DATE_FORMAT does not change … | |
Hi, This may help others too here if i succeed. I created a web form (mysql database) by phprunner v6.0. all went well. form is showing mysql data, can submit, edit add delete data. now there is a programming part which is need to be done and because of lack … | |
Hi all, I really need help for fixing one of the issue in my project. We have a passenger table which is used for Airlines operation. We need to sort the passengers by their seat numbers. Seat numbers are in format <1/2digits><1Alphabet> eg: 1A, 1B, 1C, 22A, 11B, 24D, 9A, … | |
The case: On my site there are four profile types: persons, artists, companies and events. A user can create multiple profiles. Each profile can be connected to another profile. So a person-profile can for example connect to an artist-profile, but also to an event-profile, and an event-profile can connect to … | |
dear all i have 2 tables, one is project table and another replies table. [ICODE]"SELECT * FROM project, replies WHERE replies.member_id=$_SESSION[member_id] AND project.project_id=replies.project_id ORDER BY project.project_id "; [/ICODE] the above code gives me all , but I need the latest updated replied in each project id I tried [CODE]SELECT * … | |
I have heard that AJAX is a way to get a page to refresh when a MySQL db has changed. Basically we have a log (that several users at a time could be looking at), when data is submitted it posts to the MySQL db. Instead of having the page … | |
hi everyone when i tried to import my web site database to local sql server myphpadmin show me this errors i dont know why ?? please help me [QUOTE]Error SQL query: -- -- Database: `hakaek10_alqemaalhakaek` -- -- -------------------------------------------------------- -- -- Table structure for table `rafia_admin_menu` -- CREATE TABLE IF NOT … | |
Dear All, I got one table as the tblMasterData then I left join it with another table like this tblEventAlert. So what I want to do if there is a match between tblMasterData and tblEventAlert then for that tblEventAlert I would like to match it with tblDevice to to get … | |
Hey Everyone hope all well. I have this code that works perfectly on a mysql database [CODE]<?php // visit http://php.net/pdo for more details // start error handling try { // connect $pdo = new PDO('mysql:host=localhost;dbname=name', 'name', 'password'); // enable error handling through exceptions $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // create safe query $query … |
The End.