Jump to content

NewB Question about mysql


Doomflame

Recommended Posts

same way as said

 

$result = mysql_query("SELECT name, owner, value, shares FROM stocks WHERE owner = \'$username\'"); 

$row = mysql_fetch_array($result); 

$na= $row[\'name\']; 

$ow = $row[\'owner\'];

$va = $row[\'value\'];

$sh = $row[\'shares\'];

Link to comment
https://forums.phpfreaks.com/topic/385-newb-question-about-mysql/#findComment-1316
Share on other sites

No, I mean if it should fetch 5 names, values, and shares....

 

How would I store them in arrays like this:

 


$name = array("name1", "name2", "name3", "name4", "name5")

$values = array("value1", "value2", "value3", "value4", "value5")

$shares = array("shares1", "shares2", "shares3", "shares4", "shares5")



replacing ___1-5 with the fetched value.

Link to comment
https://forums.phpfreaks.com/topic/385-newb-question-about-mysql/#findComment-1317
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.