-
Posts
3,372 -
Joined
-
Last visited
-
Days Won
18
Everything posted by Muddy_Funster
-
dont wrap field names inside quotes INSERT INTO gallery (imgpath) VALUES ('$filename')
-
Querying databases and displaying results in tables
Muddy_Funster replied to soullessj's topic in MySQL Help
SELECT name FROM table ORDER BY name ASC -
$row[] is an array.... and why are you running a loop within a loop
-
To many iterations of value in MySQL Query
Muddy_Funster replied to imperium2335's topic in MySQL Help
Have you tried changing the order of your GROUP BY to have the enquieryRef at the start? -
erm... There can be a login table if you make a login table.
-
I think it may be a flaw in your logic, that when the final record is selected the value then = the (select) value rather than being <> the (select) value. Best i can come up with from the information given.
-
INSERT into mySQL (full string please!)
Muddy_Funster replied to blakes01's topic in PHP Coding Help
First Place I would look would be the mysql_real_escape_string(). As this isn't user chosen data you don't in theory need to use the real escape, but if you do want to use it I would suggest applying a quoted str to the variable first and then apply the real escape. Hope that helps. -
How to request mySQL data from Microsoft Access
Muddy_Funster replied to HuntsvilleMan's topic in MySQL Help
The easier (and in my opinion) better way would be to use the ODBC if you can. If Yahoo won't support you in doing this then I suggest moving to 34SP.com as I know for a fact that I have ODBC access to my several MySQL databases I get from hosting with them. I would make this sound less like an advert if I had working knowledge of other hosting companies that provided the service - but I don't, although I do hope some other people will post some up. I personaly suggest sticking with what you know just now and moving once you have the knowledge and confidence that if something goes wrong somewhere along the line, you will be able to sort it. Oh, and I only asked as your thread title is asking the oposite of what you are in the post -
How to request mySQL data from Microsoft Access
Muddy_Funster replied to HuntsvilleMan's topic in MySQL Help
I'm sorry - what is it that you want to do? Do you know that MS Access has an ODBC conection layer that can run the MySQL ODBC Connector driver and just link directly to your MySQL database tables its self? -
"then it don't doing anything..." isn't a productive description of your problem. What would be better would be telling us exactly what it DOES do (even if it's only producing a blank page) versus what you are trying to make it do. In addition to that, a couple of things you should be aware of : 1- you should never store passwords in plain text 2- all I or anyone else would need to gain someones password would be their email address (you should at least think about mailing the associated password to the address given) 3- you have no data sanitisation what so ever going on in the page, and as such your form is completly open to attack.
-
As data is fetched asyncronously by MySQL, the id field is indead contiguious, the OP said that the column was deffinately auto_inc and the example dataset shows no indication of entry timestamping: I stand by (probably in complete error, but in the absence of a better idea) the issue being with select returning the data without a fixed order being declared.
-
it's impossabe to tell from the information given if the sequencing is off on entry or return. MySQL does not automaticly return information in a set order, you need to use the "order by" clause for that - Try appending ORDER BY id at the end of the SELECT query and see what happens.
-
could you elaborate please.
-
Including some better error capture would help find out what the actual problem is : or die ("Couldn't connect to server. The following error occured :<br><br>".mssql_error());
-
And assuming that ID field is an auto_inc integer - don't wrap it in quotes.
-
Copy row from table 1 into table 2, reset ID (use autoincrement)
Muddy_Funster replied to Marmachine's topic in MySQL Help
yeah - stop using select * INSERT INTO <table1> (field2, field3, field4...) SELECT (field2, filed3, filed4... FROM <table2> WHERE field1 = [value]) -
Create a BLOB field : http://dev.mysql.com/doc/refman/5.0/en/blob.html
-
don't follow.... explain please what do you think is wrong with the OP code Use of an INNER JOIN on the tables pos & pourbaskets would provide the 1->1 relationship that he wants between the fields. SELECT sum(pos.amount) FROM pos INNER JOIN pourbaskets ON (pos.enqRef = pourbaskets.enquieryRef), jobs WHERE pos.currency = '£' AND pos.jobRef = jobs.id AND jobs.isInvoiced = 1 AND pourbaskets.vat = '0.00'[code] For example would be a better way of doing it.
-
Without knowing your tables - I have no idea
-
It's just easier to manage on bigger pages, using the . concatination method can get quite confusing when there is a lot going on, and makes it easier to make mistakes. If it were to affect speed or resource it would be so negligable that you would be hard pressed to notice.
-
$q = "SELECT RegisteredUsers FROM student WHERE cname = {$_GET['cname']}"; While you can drop a flat variable between double quotes and it will parse the contents- when you are using an array you need to wrap it inside {} to have it recognised. In addition, you must always put quotes arround the array key that you are pointing at (otherwise PHP sees it as constant, not a variable.) Also, you need to be consistant with your error capture - you use or die () in the first page during query execution, but not the second.
-
Learn how to use JOIN - it's a core part of MySQL syntax for anyone using more than 1 table.
-
try just $__TEXT__[$fields]
-
what does print_r($row); give you?