10,942 Topics

Member Avatar for
Member Avatar for joeyliew7

i have this problem for checking for duplicate username in database. this error appear whether the username is duplicate and does not duplicate. Please help. Warning: mysql_num_rows() expects parameter 1 to be resource, boolean in <?php include_once 'db/db.php'; include_once 'admin-class.php'; $admin = new itg_admin(); if(isset($_POST['Submit'])) { $con = mysql_connect("localhost","username","password","tablename"); if …

Member Avatar for dancks
0
226
Member Avatar for Riu 2009

hi everyone..hope every1 is going great..well i'm a beginner in mysql and php and i cant fix the query as i desire..iam joining 3 tables here and displaying thre data.. 1st i have displayed course names from the courses table 2nd i have displayed the subject names from wich the …

Member Avatar for Riu 2009
0
230
Member Avatar for manishp5

I am trying to insert my form's data radio buttons into my mysql database. it works very well but when i skip any one value of my radio button,as this is more than 20, its giving error that Notice: Undefined index: qr1 in C:\wamp\www\exam\contents\omr.php on line 134 Call Stack # …

Member Avatar for manishp5
0
5K
Member Avatar for bibiki

Hey there, I have these three tables: A, B, and C. A has a one-to-many relation with both B and C. Right now, what I am doing is: I run a select query on A. I put the results on an array, lets say aArray. For each row in the …

Member Avatar for nduduzo
0
283
Member Avatar for shhh
Member Avatar for adam.adamski.96155

I have two tables, author and quote: author: AID, Name, YOB, YOD. quote: ID, AuthID, Content. I currently get all the authors with one query and as I loop through them, I run a second query to get the count of quotes that have the current AID: $sql = "SELECT …

Member Avatar for Icone
0
293
Member Avatar for patsfans

I have two tables that I need to get the following information but I can't seem to figure out how to structure the query: Table 1 type show max min Table 2 model height width depth In Table 1 I have the following for the first row (as an example): …

Member Avatar for Icone
0
181
Member Avatar for atkinsonsits

Hi I am attempting to build my own cms (although very basic) using php and mysql. Instead of having a static homepage, I want the content displayed to be dynamic. In other words, I want the homepage to be flexible/changeable based on whatever the latest 'content' entry into the database …

Member Avatar for Icone
0
1K
Member Avatar for jacob21

Hi, i am inserting data from CSV file in mysql. I am trying to skip ist row of CSV file as it contains headings. need suggestions??

Member Avatar for pritaeas
0
202
Member Avatar for diafol

SELECT t.* FROM (SELECT * FROM jobs WHERE `status` IN (0,1,2,3) ORDER BY `status` DESC, job_datetime LIMIT 11, 20) AS t That's a cut down sample of my sql. It was more complicated, but I've pared it down to this just to see why I was getting some strange numbers …

Member Avatar for pritaeas
0
182
Member Avatar for Stardemos

i need a querry to add -- in the end of a table. for example if i have a table like tb name ze ad|ID| aa | -------------- 01|02|aa01 | 02|03|aa02 | how do i add -- to the end of all fields of aa column to be like aa01--\aa02--?

Member Avatar for Stardemos
0
144
Member Avatar for AndreRet

Stuck again... :) I am returning close to 60 records from a search in mysql. I want to add these records to a select box. When I am looping through the records, it adds a select box for each record. Not sure where I am going wrong. It does load …

Member Avatar for AndreRet
0
275
Member Avatar for rotten69

Hey guys, I don't see anything wrong in the function but mysql_result is complaining about the parameter value passed to it. function question_exists($question_id){ $question_id = (int)$question_id; return ( mysql_result(mysql_query("SELECT COUNT('id') from `posts` WHERE `id`=$question_id"),0) == 0) ? false : true; // if the question doesn't exist (equal to ZERO) then …

Member Avatar for rotten69
0
130
Member Avatar for mbhanley

I am trying to configure a menu for my CMS I want to be able to use Nested Sortables just like you have in WordPress. The problem Im having is getting my head around how I am going to start I already have a column in my database table called …

Member Avatar for mbhanley
0
721
Member Avatar for AndreRet

I am totally stuck here and found tens of samples on posting to get and set values. What I am trying to do is - 1) Let a user enter a vehicles year model into a textbox in my form (set to post) 2) I then need to get this …

Member Avatar for AndreRet
0
224
Member Avatar for jvause3

I'm trying to use a drop down form box & select statements to gather certain pieces of information from my database however i'm recieving the error **Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /study/comp/c3329871/webpages/mysql/queryContinent.php on line 26** This is the code from my php file …

Member Avatar for LastMitch
0
304
Member Avatar for paulmcdoodles

Hello, I am getting the following error message: Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/mochas/domains/zoink.sx33.net/public_html/includes/blogpost.php on line 54 My code (Line 54): while($row = mysql_fetch_assoc($query))

Member Avatar for paulmcdoodles
0
181
Member Avatar for joslup9

Hello guys, i need a help slightly with this project of my university. my equipment are working with some components, 1. Radius Server - MySQL - OS Linux Ubunto 12.04 or OS Microsoft WindowsServer2008 - SQLServer. 2. Router Linksys Wrt-54g 3. Other Server with certification unit, which we need manage, …

Member Avatar for JorgeM
0
243
Member Avatar for wastedkill

Hi I am having some issues with getting data to update for a logged in users account, I have got it to display the data in the database which i want to edit but for some reason it just wont go through it says it has updated but when I …

Member Avatar for wastedkill
0
203
Member Avatar for mbhanley

Does anyone know a better way of getting this code to execute the mysql queries. I am trying to Insert table records to a new table then update it. so I need to call the table cms_homecontent first then insert those values to the new table cms_homecontent_versions and also ignore …

Member Avatar for mbhanley
0
239
Member Avatar for simplypixie

I am baffled, I have the following query which should return 4 records but for some reason it is counting 8 records and returning each row twice. I know I could use distinct, but as I also know that there are no duplicate records in this table I don't want …

Member Avatar for simplypixie
0
132
Member Avatar for jaysh4922

hi frnds..can you give some idea about php training.how to start in online or any institute

Member Avatar for jaysh4922
1
102
Member Avatar for darren2005

Hi, I am trying to create a script which searches through a MySQL column which contains URLs and check the URLs to see if they are up OR down. At the moment I am getting no results added into the database e.g. 1 = UP, 0 = DOWN. Can someone …

Member Avatar for darren2005
0
159
Member Avatar for saadi06

Hi, I wanted to know that can we use a php function on a column in mysql query. I want to make something like this SELECT html_entity_decode('field') from table. Thanks in advance.

Member Avatar for pritaeas
0
43
Member Avatar for adishardis

Hi, I'm wondering what type of mysqlfield would be advantageous for outputting the containing text as a bullit list in php and if the text should be formatted a certain way. I would be supergrateful for an example! :p Take care Adam

Member Avatar for adishardis
0
777
Member Avatar for newprimitive

Hello, I have problem with entering default values in MYSQL database. When i insert new record using phpmyadmin it works fine (empty fields get default value), but when i use the same query in my application (written in PHP), empty fields in html form don't get default value in MYSQL …

Member Avatar for ffghjk
0
242
Member Avatar for Octet

Hello DaniWeb, I've finally gotten around to swapping from MySQL to MySQL(i), mainly due to it's security advantages with Prepared Statements. In the past I've been adding `include ('/Some/Directory/File.php);` to the top of each page, so that I can store my functions in a secure directory and so that I …

Member Avatar for Octet
0
254
Member Avatar for PowerCheez

I have a small problem. I wrote this script to update the status of my list using a checkbox for each line I want updated. But I (beeing new to this whole thing) can't seem to get my button to do what I want it to do. <?php //ansluter till …

Member Avatar for PowerCheez
0
222
Member Avatar for eman neercs

I have a table which shows our top sellers and Weeks of Stock left. Its generated by joining an order db with a stock db. I'm struggling with try to capture the really fast movers. Here is the script SELECT a.EAN, a.SKU, a.Name, Sum(a.OrderedQuantity) Round(Avg(a.Price),2) as AvgPrice b.Quantity, round((b.Quantity/Sum(a.OrderedQuantity)),0) as …

Member Avatar for eman neercs
0
114
Member Avatar for Vingklippt

I am trying to create a form that updates mySQL-database. I've created three php-pages. **updatepizza.php** <?php $host="localhost"; // Host name $username="root"; // Mysql username $password="billie"; // Mysql password $db_name="cygna_fyraarstider"; // Database name $tbl_name="pizza_menu"; // Table name // Connect to server and select database. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot …

Member Avatar for Vingklippt
0
218

The End.